Number Base Converter
Every Base From 2 to 36, With Each Step Shown
Type a number into this number base converter and see it in binary, octal, decimal, hex and any base up to 36, exact to the last digit.
- FreePrice
- 2 to 36Bases
- NoneSign-up
- In your browserRuns
Number Base Converter
Binary, octal, decimal, hex and every base from 2 to 36
Ready. Type a number in any base.
| Base | Value | Copy |
|---|
| Width | Binary | Hexadecimal |
|---|
| Result | Check | Details |
|---|
Show the working
| Number | Divided by | Quotient | Remainder (digit) |
|---|
Jobs This Number Base Converter Handles for You
This number base converter takes one number and writes it in every common base at once. Take 255: in binary it reads 11111111, in octal 377 and in hex FF. Type 0xFF instead, and the converter notices the prefix and reads it as hex without being told.
Numbers of any size go through fine. Most online converters quietly round anything above about sixteen digits, because they use ordinary floating-point numbers. This one uses exact whole-number maths, so a 40-digit ID or a 128-bit key comes out right to the very last digit.
Beyond the plain conversion, it shows what developers and students usually need next: the two’s complement form for signed integers, the number of bits and bytes, which integer types it fits, and the step-by-step working behind the answer.
How Number Bases Work
To begin with, a base is simply how many different digits a system uses. Base 10 relies on the ten digits 0 to 9. Base 2 gets by with only the digits 0 and 1. Hexadecimal has sixteen, so after 9 it borrows the letters A to F. Octal has eight, from 0 to 7.
In every base, each position is worth the base times the position to its right. Decimal places are worth 1, 10, 100, and upward from there. Binary place values run 1, 2, 4, 8, 16. So binary 1011 adds up as 8 + 0 + 2 + 1, giving 11 in decimal.
Binary to Decimal, Hex to Decimal and Back
The two conversions people search for most are binary to decimal and hex to decimal. Both work the same way here: type the number, pick the base it is written in, or let a 0b or 0x prefix decide, and every other base appears straight away.

For long binary numbers, the grouping switch splits the digits into blocks of four, which matches one hex digit each. That makes 1101 1110 1010 1101 far easier to check than a solid row of ones and zeros, and it shows at a glance that the hex form is DEAD.
Signed 8-, 16-, 32- and 64-Bit Values
Computers store negative whole numbers in a form called two’s complement. The highest bit acts as the sign, and the rest are flipped and shifted so that adding numbers still works. As a result, -1 in an 8-bit byte is 11111111, not 10000001.

The converter shows this form at 8, 16, 32 and 64 bits, in binary and hex. When a number is too big for a width, that row says so instead of showing a wrong pattern. For a deeper explanation, the two’s complement article on Wikipedia walks through the arithmetic.
Fractions, Exact to the Last Digit
Numbers with a point convert too. For example, 10.625 in decimal is exactly 1010.101 in binary. Some fractions, however, never end in another base. The decimal 0.1 becomes 0.000110011… in binary, repeating forever.

Instead of cutting such a number off without warning, the converter finds the repeating block and puts it in brackets: 0.0(0011). That is also the reason 0.1 + 0.2 is not exactly 0.3 in most programming languages, since the computer has to round that endless binary fraction somewhere.
Why Programmers Love Hexadecimal
Each hex digit covers exactly four bits, which is why a byte takes two of them. That is why colours are written as #FF8800, memory addresses as 0x7FFF, and file signatures as 89 50 4E 47. Hex is short enough to read and still maps cleanly to the bits underneath.
Hex to Decimal and Binary to Decimal in Daily Work
Web designers meet hex to decimal every day, because a colour such as #1B5FD1 is three hex bytes: 27, 95 and 209 for red, green and blue. Network staff, meanwhile, use binary to decimal when they read subnet masks, since 255.255.255.0 is simply twenty-four ones followed by eight zeros.
Programmers, in turn, read error codes, memory dumps and file headers in hex. So when a log says 0x80070005, typing it here shows the decimal value and the bit pattern at once. Likewise, students checking homework can compare their own working with the steps below.
Every Division and Multiplication Shown
Teachers, however, usually want the method, not only the answer. Open the working section, and the converter shows the classic repeated division: divide by the target base, write down the remainder, and carry on with the quotient. Write the remainders in reverse order, and those are the binary digits.
You can pick which base the working uses with the Also show menu. So the same page covers decimal to binary homework, decimal to hex and even base 7 exercises.
Base Conversion in Code
In fact, most languages can convert bases in one line. In JavaScript, parseInt("ff", 16) reads hex and (255).toString(2) writes binary. For numbers above 2 to the power of 53, however, use BigInt, or the last digits will be wrong.
Python has int("ff", 16) plus bin(), oct() and hex(). PHP offers base_convert(), which also loses precision on very large numbers. When you need a quick answer you can trust, this page is the easier check.
Converting Between Number Bases on Denwix
The answer appears while you type, so a whole conversion takes a few seconds.
- 1
Type the number
Spaces and underscores between digits are fine, and so is a point for fractions.
- 2
Set the base it is in
Leave it on Detect for 0x, 0b and 0o prefixes, or pick any base from 2 to 36.
- 3
See all bases side by side
Binary, octal, decimal and hex are always shown, plus one base of your choice.
- 4
Copy or learn the method
Copy any value, or open the working to see how the answer was reached.
Built for Real Numbers
Small numbers are simple to convert. These details handle the hard cases.
Exact at any length
Whole-number maths keeps 40-digit IDs and 128-bit keys exact.
Radix 2 at the low end, radix 36 at the top, and every radix in between
Not just the famous four: base 3, base 7 and base 36 work too.
Two’s complement
Two’s complement at 8, 16, 32 and 64 bits, shown in binary and hex.
Honest fractions
Repeating digits are marked, never silently rounded.
The working shown
Every division step, ready for homework or a lesson.
Private by design
Once loaded, the page keeps working offline and uploads nothing.
Habits That Make Number Bases Easier
These habits prevent most conversion mistakes.
- Write the prefix. 0x for hex, 0b for binary and 0o for octal make the base clear to people and to code.
- Group long binary. Blocks of four digits line up with hex and make typing errors easy to see.
- Mind the width. A signed 8-bit value only reaches 127. Check the width before you store a number.
- Keep big numbers as text. IDs longer than 15 digits should travel as strings, or JavaScript will round them.
- Mark the base, for example 0b101 or 0x1F. The digits 10 mean ten, eight, two or sixteen depending on the base.
- Beware of fractions. Money in binary floating point never adds up exactly, so store cents as whole numbers.
Six Base Conversion Mistakes
Each one gives an answer that looks right but is not.
Reading 010 as ten
Some languages treat a leading zero as octal, so 010 becomes eight.
Trusting rounded results
Floating-point converters lose digits above about sixteen places.
Forgetting the sign bit
11111111 is 255 unsigned, but -1 as a signed byte.
Typing a capital O where 0 belongs
A capital O in a hex string is not a digit at all.
Dropping a digit
One missing bit halves or doubles the whole value.
Putting a digit in the wrong column
In hex the places are 1, 16, 256 and 4096, not 1, 10 and 100.
Number Base Converter Questions People Ask
What steps turn a binary number into decimal?
Type the binary number, or start it with 0b. The decimal value appears at once, along with octal and hex.
What steps turn a hex number into decimal?
Type the hex number with 0x in front, or choose Hexadecimal as the base. The decimal value appears straight away.
How can I work out binary from decimal with pen and paper?
Divide by 2 again and again and note each remainder. Read the remainders upward from the final division. The working section shows every step.
Which bases, from 2 to 36, does Denwix support?
Radix 2 at the low end, radix 36 at the top, and every radix in between. After 9, the digits continue with the letters A to Z.
Will the Denwix converter handle numbers with dozens of digits?
Yes. Whole numbers of thousands of digits stay exact, because the tool does not use floating-point maths.
Can the converter show negative numbers too?
Yes. It shows the plain negative value and the two’s complement form at 8, 16, 32 and 64 bits.
Can I convert numbers with a decimal point?
Yes. Fractions convert exactly, and digits that repeat forever are marked with brackets.
Why is 0.1 not exact in binary?
In binary it repeats forever, as 0.0(0011). A computer has to round it somewhere, which causes small errors.
What does the 0x in front of a hex number tell a programmer?
It flags the number as hexadecimal. Likewise, 0b marks binary and 0o marks octal.
Where does base 36 turn up in real systems?
It packs numbers into short codes with digits and letters, such as in short links and some IDs.
Does the number I type ever leave this Denwix page?
No. Your browser does the conversion, and nothing is sent from the page.
More Tools for Numbers and Code
Handy next steps once your number is in the right base.
Binary Translator
Your text as binary, hex or decimal bytes, and back to text.
Open tool →IP Subnet Calculator
Work out network ranges, where binary masks matter.
Open tool →Hash Generator
Make hashes, which are long hex numbers themselves.
Open tool →
Ready to Convert Your Number?
Type it in and every base appears at once. This number base converter is free, needs no account and works in your browser.