Number Base Converter

Binary, octal, decimal and hexadecimal. Runs in your browser; nothing is uploaded.

8 bits · any size supported

How to convert between binary, octal, decimal and hexadecimal

Type or paste an integer in any of the four fields—Binary (base 2), Octal (base 8), Decimal (base 10), or Hexadecimal (base 16)—and the other three fields update immediately, along with the total bit length.

  • Flexible input: prefixes such as 0x, 0b, and 0o, spaces, and underscore digit separators (1_000_000 or 0xFF_00_AA) are accepted, as are negative numbers.
  • No bit-width limit: powered by arbitrary-precision integers (BigInt), so 64-bit, 128-bit, and 256-bit integers convert with zero floating-point rounding.

Binary, octal, decimal & hexadecimal reference table (0–15)

Because 8 = 23 and 16 = 24, every octal digit maps to a 3-bit binary group and every hexadecimal digit maps to a 4-bit binary nibble:

Decimal (Base 10)Hexadecimal (Base 16)Octal (Base 8)Binary (Base 2, 4-bit)
0000000
1110001
2220010
3330011
4440100
5550101
6660110
7770111
88101000
99111001
10A121010
11B131011
12C141100
13D151101
14E161110
15F171111

Frequently asked questions

Why do programmers use hexadecimal (base 16) instead of binary (base 2)?
Because 16 is 24, each hexadecimal digit (0–9, A–F) maps to exactly 4 binary bits (a nibble), and two hex digits represent 1 byte (8 bits, 00 to FF). Hexadecimal makes binary memory addresses, byte arrays, bitwise masks, and RGB colors compact and easy to read.
What is the largest number this base converter can handle?
There is no 32-bit or 64-bit limit. The converter uses arbitrary-precision integers (BigInt), so 128-bit UUIDs, 256-bit cryptographic hashes, and numbers hundreds of digits long convert with exact bit-for-bit accuracy.
Can I paste numbers with 0x, 0b, or 0o prefixes or underscore separators?
Yes. Standard programming prefixes (0x for hex, 0b for binary, 0o for octal), spaces, underscores (such as 1_000_000 or 0xFF_00_AA), and negative signs are automatically recognized.