Your files stay on your device

# Number base converter

Convert whole numbers between binary, hex, decimal, and any base up to 36.
Number in base 10

Type digits only, without 0x or 0b. Any size works.

- Binary (base 2)Copy`11111111`
- Octal (base 8)Copy`377`
- Decimal (base 10)Copy`255`
- Hex (base 16)Copy`FF`
Options

## 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

- [Escape / unescape](/text/escape)
- [Unit converter](/converters/units)
[All text tools](/text)

Was this tool useful?
YesNo

---

Canonical HTML: https://nutter.tools/text/number-bases
Markdown version: https://nutter.tools/text/number-bases.md
Plain-text version: https://nutter.tools/text/number-bases.txt
Agent index: https://nutter.tools/llms.txt

