Binary / Decimal / Hex / Octal Converter
Type a number in any base — binary, octal, decimal or hexadecimal — and see it instantly converted to all four, side by side.
How to use
Select which base your input number is in, then type it — all four representations update live. Invalid digits for the selected base (like an '8' while in binary mode) are simply rejected rather than silently producing a wrong result.
Hex is used constantly in programming for memory addresses, color codes (#FF5733) and byte values; binary underlies bitwise operations and flags; octal shows up in Unix file permissions (chmod 755). This tool covers the conversions between all of them that come up most often.
FAQ
Why does hexadecimal use letters A–F?
Hex is base 16, so it needs 16 distinct digits. After 0–9 run out, it continues with A (10) through F (15). A byte (8 bits) maps neatly to exactly two hex digits, which is why hex is the standard way to write memory addresses and color values.
How do I convert a negative number?
This tool handles positive integers. Negative numbers in binary/hex are typically represented using two's complement at a fixed bit width (8, 16, 32 bits), which depends on the width you're working with — a detail worth handling explicitly in code rather than a generic converter.
What is octal used for today?
Mainly Unix/Linux file permissions, written as three octal digits (e.g. `755`) representing read/write/execute bits for owner, group and others. It's less common elsewhere now that hex dominates for most other low-level uses.
Is there a limit to how large a number I can convert?
This tool uses standard JavaScript number precision, reliable up to 2^53 (about 9 quadrillion) — far beyond what fits in a 32-bit or 64-bit register for typical programming use cases.