DevUtils

Number Base Converter

New

Convert numbers between binary, octal, decimal, and hexadecimal online for free. Full 64-bit precision using BigInt. Enter a value in any base and all others update instantly. No signup required.

Enter a number in any field to convert to all bases
Prefix: 0b
Prefix: 0o
Prefix: 0x
Common Values Reference
DecimalBinaryOctalHex
0000
1111
21022
81000108
10101012A
16100002010
321000004020
64100000010040
100110010014464
1281000000020080
25511111111377FF
256100000000400100
51210000000001000200
1024100000000002000400
20481000000000004000800
40961000000000000100001000
819210000000000000200002000
16384100000000000000400004000
3276810000000000000001000008000
655351111111111111111177777FFFF
655361000000000000000020000010000

About this tool

Computers represent numbers internally in binary (base 2), but programmers regularly work with octal (base 8) and hexadecimal (base 16) as well. Hexadecimal is ubiquitous in computing: memory addresses, RGB color codes (#ff6347), file format magic numbers, bitmasks, and network MAC addresses are all expressed in hex. Octal is common in Unix permissions (chmod 755). This tool converts numbers between binary, octal, decimal, and hexadecimal using JavaScript BigInt for full 64-bit precision—enter a value in any field and all others update instantly.

How to use

  1. 1Type a number into any of the four fields: Binary (base 2), Octal (base 8), Decimal (base 10), or Hexadecimal (base 16).
  2. 2All other fields update instantly with the converted values.
  3. 3Prefixes (0b, 0o, 0x) are accepted and stripped automatically.
  4. 4Values are computed with full 64-bit precision using BigInt — no rounding for large numbers.

Frequently asked questions

What is hexadecimal (base 16)?
Hexadecimal uses 16 digits: 0–9 and A–F. Each hex digit maps exactly to 4 binary bits (a nibble), so two hex digits represent one byte (8 bits). This makes hex a compact, human-friendly representation of binary data: 0xFF = 11111111 binary = 255 decimal.
Why does this tool use BigInt instead of regular numbers?
JavaScript's standard number type (IEEE 754 double) can only represent integers exactly up to 2^53 (about 9 × 10^15). 64-bit values common in systems programming—like 0xFFFFFFFFFFFFFFFF—would lose precision. BigInt handles arbitrarily large integers exactly.
What are Unix file permission numbers in octal?
Unix permissions are three octal digits: owner, group, other. Each digit is a 3-bit mask: 4 = read, 2 = write, 1 = execute. chmod 755 means 111 101 101 binary, or rwxr-xr-x: the owner can read/write/execute; group and others can only read/execute.
How do I recognize a number's base by its prefix?
Binary values are prefixed 0b (0b1010), octal with 0o (0o755), and hexadecimal with 0x (0xFF). A number with no prefix and only digits 0–9 is decimal. This tool accepts input with or without these prefixes.