Free binary, hex and decimal converter
Number Base Converter
Any base, exact, with steps.
Type a positive or negative whole number of any length, in any base from 2 to 36. Read it in binary, octal, decimal, hex and one more base, and see how it was worked out.
Exact for whole numbers of any length.
- 2–36Any basePlus the four you use most
- 2⁶⁴Exact for big numbers64-bit IDs and more
- ÷Show stepsDivision, row by row
Whole numbers of any length. A minus sign at the start is fine, and spaces or underscores are ignored.
Changes how the results look. Copy writes the plain value.
Binary (base 2)
Octal (base 8)
Decimal (base 10): input
Hexadecimal (base 16)
Other base
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 2 | 10 | 2 | 2 |
| 3 | 11 | 3 | 3 |
| 4 | 100 | 4 | 4 |
| 5 | 101 | 5 | 5 |
| 6 | 110 | 6 | 6 |
| 7 | 111 | 7 | 7 |
| 8 | 1000 | 10 | 8 |
| 9 | 1001 | 11 | 9 |
| 10 | 1010 | 12 | A |
| 11 | 1011 | 13 | B |
| 12 | 1100 | 14 | C |
| 13 | 1101 | 15 | D |
| 14 | 1110 | 16 | E |
| 15 | 1111 | 17 | F |
/number-base-converter
How it works
Pick a base, type, copy. Every result updates as you type.
- 1
Pick the input base
Choose Binary, Octal, Decimal, Hexadecimal, or Other for any base from 2 to 36.
- 2
Type the number
Type it with or without its prefix. Spaces and underscores are fine, for example 1111 1111.
- 3
Read every result
Hex to decimal, binary to decimal and the other pairs update as you type, plus the base you picked.
- 4
Copy or show steps
Press Copy next to the result you need, or turn on Show steps.
Frequently Asked Questions
Bases, examples, steps and limits.
How do I convert hex to decimal?
Choose Hexadecimal, type the hex number, and read the Decimal result. For example, FF in hex is 255 in decimal.
How do I convert binary to decimal?
Choose Binary, type the binary number, and read the Decimal result. For example, 1010 in binary is 10 in decimal. Turn on Show steps to see the number divided by 2, row by row.
How do I convert decimal to binary or hex?
Choose Decimal, type the number, and read the Binary and Hexadecimal results. For example, 255 is 11111111 in binary and FF in hex.
Which bases are supported?
Any base from 2 to 36. Binary, octal, decimal and hexadecimal are always shown, plus one other base you pick, which starts at base 36.
What do 0b, 0o and 0x mean?
They are prefixes that show the base. 0b is binary, 0o is octal and 0x is hexadecimal. You can type a number with or without its prefix. Other bases have no prefix.
Are letters case-sensitive?
No. You can type letters in upper or lower case, for example A to F in hex or A to Z in base 36. Results are shown in uppercase.
How big a number can I convert?
Whole numbers of any length, positive or negative, convert exactly, including numbers far past 2^53. Very long numbers are worked out in the background. Decimals are not supported, so a decimal point shows as invalid.
What happens if I type a digit that does not fit the base?
The field turns red and tells you which character does not fit and what to type instead. For example, FG is not a hex number, because G is not a hex digit.
Can I convert negative numbers?
Yes. Type a minus sign at the start. The result keeps the sign, so -42 in decimal shows as -101010 in binary and -2A in hex. This is a plain minus sign, not two's complement.
How does Show steps work?
It divides your number by the base you typed it in, one row at a time. Each row shows the quotient in decimal and the remainder, which is one digit of your number. Read the remainders from the bottom up to get the digits back. Up to 8 rows are shown, and steps work for numbers up to 64 digits in decimal.
Can I paste 1111 1111 or 0xFF_FF?
Yes. Spaces and underscores are ignored, so both work. Group digits only changes how the results look, adding spaces, or commas in decimal. Copy always writes the plain value.