Number base converter
Convert whole numbers between binary, hex, decimal, and any base up to 36.
Number
Type digits only, without 0x or 0b. Any size works.
- Binary (base 2)
11111111 - Octal (base 8)
377 - Decimal (base 10)
255 - Hex (base 16)
FF
Four bits per hex digit
Each hex digit stands for four bits, because sixteen values fit in four binary places. FF is therefore 1111 1111, which is 255. Octal groups bits in threes, so 377 is 011 111 111 with the leading zeros dropped, and that is also 255.
Take 1F4. The 1 is worth 256, the F is 15 times 16, or 240, and the 4 adds 4. The total is 500.
| FF | Hex for 255, two groups of four bits |
| 377 | Octal for 255 |
| 1F4 | Hex for 500 |
Letters past nine
Once a base goes past ten, letters carry the extra digits. Base 36 runs 0 to 9 and then A to Z, so Z is 35. The input expects digits alone, so 0x and 0b prefixes are not part of what you type.
More text tools
All text toolsWas this tool useful?