Binary, Octal & Hex Converter

Convert between binary, octal, decimal, and hexadecimal instantly — type in any one field and the other three update live.

About this tool

How to use it

  1. Type a number into any one of the four fields — binary, octal, decimal, or hexadecimal.
  2. The other three fields update automatically as you type.
  3. If a field turns invalid (a digit that doesn't belong in that base), a message explains which digits are allowed.
  4. Use Clear All to reset every field, or Convert to force a re-check of whichever field you last edited.

Why it matters

Computers work in binary at the hardware level, but binary is unwieldy for humans to read or write, so hexadecimal (and sometimes octal) are used as compact shorthand — a byte that's 11111111 in binary is just FF in hex. Converting by hand between bases means either memorizing conversion tables or working through repeated division, both of which are slow and error-prone, especially for larger numbers.

When to use it

Useful for reading memory addresses, color codes, file permissions (octal), or IP/MAC address components, for converting between number bases while working through a computer science or electronics course, or for checking a manual conversion against a reliable source.

Good to know

All four fields represent the exact same value in a different base — there's no 'input' and 'output' here, since typing in any field derives the other three. Only non-negative whole numbers are supported; each field only accepts the digits valid for its own base (0-1 for binary, 0-7 for octal, 0-9 for decimal, 0-9 and A-F for hexadecimal). Very large numbers are handled with full precision using arbitrary-precision arithmetic, not floating-point, so results stay exact even far beyond the point where ordinary JavaScript numbers would start losing precision.

Common questions

Why does hex use letters as well as numbers?

Hexadecimal is base 16, which needs 16 distinct digit symbols — 0 through 9 covers only the first ten, so A through F (representing 10 through 15) fill in the rest. FF in hex is 255 in decimal, the largest value a single byte can hold.

Can I convert negative numbers?

No — this tool only handles non-negative whole numbers. Negative numbers in binary depend on a specific representation convention (like two's complement) and a fixed bit width, which this general-purpose converter doesn't assume.

Is there a limit to how large a number I can convert?

No practical limit — the conversion uses arbitrary-precision arithmetic rather than ordinary floating-point numbers, so even very large integers convert exactly rather than losing precision.

What does octal get used for?

Octal (base 8) is less common today than hex, but it's still used for Unix/Linux file permissions (like chmod 755), since each octal digit maps cleanly onto 3 binary bits — one for read, write, and execute permission.

Why do some fields reject certain characters?

Each base only has digits up to one less than the base itself — binary only uses 0 and 1, octal only 0 through 7. Typing a digit that doesn't belong in that base (like an 8 in an octal field) shows a message rather than silently accepting or misinterpreting it.