Number Base converter
Rewrite whole numbers in another base.
Converter
Quick pairs
tap to loadThe four bases side by side
| Decimal | Binary (base 2) | Octal (base 8) | Decimal (base 10) | Hexadecimal (base 16) |
|---|---|---|---|---|
| 1 | 1 | 1 | 1 | 1 |
| 2 | 10 | 2 | 2 | 2 |
| 5 | 101 | 5 | 5 | 5 |
| 8 | 1000 | 10 | 8 | 8 |
| 10 | 1010 | 12 | 10 | A |
| 15 | 1111 | 17 | 15 | F |
| 16 | 10000 | 20 | 16 | 10 |
| 31 | 11111 | 37 | 31 | 1F |
| 32 | 100000 | 40 | 32 | 20 |
| 64 | 1000000 | 100 | 64 | 40 |
| 100 | 1100100 | 144 | 100 | 64 |
| 128 | 10000000 | 200 | 128 | 80 |
| 255 | 11111111 | 377 | 255 | FF |
| 256 | 100000000 | 400 | 256 | 100 |
| 1000 | 1111101000 | 1750 | 1000 | 3E8 |
| 1024 | 10000000000 | 2000 | 1024 | 400 |
How the decimal (base 10) to binary (base 2) conversion works
Binary, octal and hexadecimal are the ones programmers reach for; every base from 2 to 36 is here.
To convert by hand, expand the number in its source base by multiplying each digit by the base raised to its position. Then divide the total by the target base over and over, reading the remainders from last to first.
Questions
Which units does this number base converter cover?
14 units in total, all referenced to the decimal. They include binary (base 2), octal (base 8), decimal (base 10), hexadecimal (base 16), base 3, base 4 and more. Pick any pair from the two dropdown lists.
How precise are the results?
Every conversion is computed in your browser at double precision from the factors listed on this page, which follow the SI definitions and the exact international agreements for imperial and US customary units. Use the Decimals control to round the display without changing the underlying value.
Does anything I type leave my device?
No. The converter is plain JavaScript running locally, with no server round-trip, and the page keeps working offline once loaded.