Number Base Converter
Convert numbers between binary, octal, decimal, and hexadecimal.
How It Works
Every number can be represented in different bases. The base (or radix) tells you how many
distinct digits are available before "rolling over" to the next place value. Binary (base 2) uses only 0 and 1 and is the native language of computer
hardware. Octal (base 8) uses digits 0–7 and appears in Unix file
permissions (e.g., chmod 755). Decimal (base 10) is everyday
arithmetic. Hexadecimal (base 16) uses 0–9 and a–f, and is ubiquitous in
memory addresses, color codes (#ff5500), and byte-level data.
This tool uses JavaScript's BigInt type for all arithmetic, so it handles
arbitrarily large integers without precision loss — no 53-bit limit like Number.
Related Tools
Frequently Asked Questions
How do I convert binary to decimal?
Multiply each bit by 2 raised to its position (right to left, starting at 0), then sum. Example: 1011 = 1×8 + 0×4 + 1×2 + 1×1 = 11. Or paste the binary number in the Binary field and read the Decimal result.
How do I convert decimal to hexadecimal?
Repeatedly divide by 16, recording remainders (0–9 as digits, 10–15 as a–f), then read the remainders in reverse. Example: 255 ÷ 16 = 15 remainder 15 → FF. Or just type 255 in the Decimal field here.
What is hexadecimal used for?
Hexadecimal (base 16) compactly represents binary data — one hex digit = 4 bits. It is used in memory addresses, color codes (#ff5500), byte values in protocols, and debugging output. Two hex digits represent one byte (0x00–0xFF = 0–255).
What is octal used for?
Octal (base 8) appears mostly in Unix/Linux file permissions. chmod 755 means owner = 7 (rwx), group = 5 (r-x), others = 5 (r-x). Each octal digit represents 3 bits.