Free Number Base Converter
Type a number in any base and the others update live — binary, octal, decimal, hexadecimal.
Why programmers care about bases other than 10
Every number base is just a different way of grouping the same quantity — decimal groups in tens because humans have ten fingers, but computers store everything as on/off switches, so binary (base 2) is the native representation. Hexadecimal exists as a convenience layer on top of binary: each hex digit represents exactly 4 bits, so two hex digits represent exactly one byte (00–FF covers 0–255). That clean alignment is why hex shows up everywhere in computing — color codes (#FF5733), memory addresses, MAC addresses, and hash digests are all far more compact and readable in hex than in binary.
Octal has a narrower niche today, but it persists in one very visible place: Unix and Linux file permissions. A command like chmod 755 is octal shorthand — each digit encodes three permission bits (read/write/execute) for owner, group, and everyone else, which is exactly why permissions are grouped in threes and expressed in base 8.
Worked example: converting 42
To convert decimal 42 to binary by hand, subtract the largest power of two that fits, repeatedly: 42 − 32 = 10, 10 − 8 = 2, 2 − 2 = 0. That's 32 + 8 + 2, or bits set at positions 5, 3, and 1: 101010. For hex, divide by 16: 42 ÷ 16 = 2 remainder 10, and 10 in hex is "A" — giving 2A.
Frequently Asked Questions
What number bases are supported?
Binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16) — the four most common bases in programming. Edit any field and the others update instantly.
Is there a limit on how large a number can be?
Numbers are handled up to JavaScript's safe integer limit (about 9 quadrillion, or 2^53). Values beyond that lose precision, same as any standard calculator.
Can I enter negative numbers?
Yes — a leading minus sign is accepted in the decimal field and reflected as a signed value in the others.
Why is hexadecimal used for colors and memory addresses instead of decimal?
Because each hex digit maps to exactly 4 bits, two hex digits map to exactly one byte — so hex mirrors the computer's actual binary storage far more directly than decimal does, while staying much shorter to read and type than raw binary.
What does a Unix permission like "755" actually mean?
It's octal: each of the three digits represents read (4) + write (2) + execute (1) permissions for owner, group, and others respectively. 7 = 4+2+1 (full access), 5 = 4+0+1 (read and execute only) — which is exactly what base-8 digits are suited to express in three bits each.
Is my data sent anywhere?
No. The conversion happens entirely in your browser. Nothing is transmitted or stored.