Number Base Converter

Convert numbers between binary, octal, decimal, and hexadecimal instantly — type in any field and all four update live.

Runs locally
Type in any field — all four update live.
Binary Base 2
0b
Octal Base 8
0o
Decimal Base 10
Hexadecimal Base 16
0x
BIN digits
Byte value
Signed (32-bit)
ASCII char

What are number bases?

The base of a number system determines how many distinct digits it uses. Decimal (base 10) uses digits 0-9 and is the everyday human system. Binary (base 2) uses only 0 and 1 — every digital computer operates in binary at the hardware level. Octal (base 8) and hexadecimal (base 16) are compact shorthands for binary: one octal digit represents exactly 3 bits, one hex digit exactly 4 bits. Developers encounter these constantly in memory addresses, color codes, chmod file permissions, and network masks.

How to use this tool

  1. 1 Type a number in any of the four fields — Binary, Octal, Decimal, or Hexadecimal.
  2. 2 All other fields update instantly. The info panel below shows bit length, byte count, signed 32-bit interpretation, and ASCII character (if in range).
  3. 3 Hex input is case-insensitive: ff and FF both work.
  4. 4 Click the copy icon on any field header to copy that value. Clear resets all fields.

Frequently asked questions

What is the maximum number this tool handles?

JavaScript's safe integer range is 2^53 - 1 (about 9 quadrillion). Numbers beyond that may lose precision in the decimal field. For 64-bit values or arbitrary-precision needs, you would need BigInt arithmetic.

Why do file permissions use octal?

Unix permissions are stored as a 9-bit value — three 3-bit groups for owner, group, and others. Since each group is exactly 3 bits, one octal digit represents each group perfectly: rwx = 111 binary = 7 octal. chmod 755 translates directly to rwxr-xr-x.

Why do developers use hex for color codes?

A hex color like #1A2B3C encodes three byte values — R=0x1A, G=0x2B, B=0x3C — in a compact 6-character string. One hex digit equals one nibble (4 bits), so two digits represent exactly one byte (8 bits) per color channel.

What does the Signed (32-bit) field mean?

Computers often interpret 32-bit values as signed integers using two's complement. A value like 0xFFFFFFFF (4294967295 unsigned) is -1 when treated as a signed 32-bit integer. The signed field shows what Java, C, and most languages would display for the same bit pattern.

What does the ASCII char field show?

For decimal values 32-126, the ASCII char field shows the printable character that corresponds to that code point. Space is 32, A is 65, a is 97, ~ is 126. Values outside this range show n/a because they are control characters or extended Unicode.