Number Base Converter
Type a number in any base — decimal, hexadecimal, octal, or binary — and watch the other three update instantly.
How it works
Every number system is just a different way of counting with a different set of digits. Decimal uses ten digits (0–9), hexadecimal adds the letters A–F to reach sixteen, octal counts to eight, and binary — the language of computers — uses only 0 and 1. When you type into any field, the converter first reads your value as an ordinary integer in that base, then re-expresses the same integer in the other three bases, so all four fields always describe the same number. Digits that don't belong to a base are rejected — for example, "2" is illegal in binary and "9" is illegal in octal — which is why programmers double-check values when reading memory addresses, color codes, or file permissions.
How to use
- Type a number into any one of the four fields — Decimal (base 10), Hexadecimal (base 16), Octal (base 8), or Binary (base 2).
- Watch the other three fields update instantly; they always describe the same value.
- Stick to valid digits for the base you are typing in: binary accepts only 0 and 1, octal accepts 0–7, decimal accepts 0–9, and hexadecimal accepts 0–9 plus A–F.
- If you enter an invalid digit, the error line below the fields explains the problem instead of guessing a result.
Frequently asked questions
What is a quick example of a conversion?
Type 255 into the Decimal field. The Hexadecimal field shows FF, Octal shows 377, and Binary shows 11111111 — all four describe the same number.
Why do programmers use hexadecimal?
Hex is compact: every two hex digits represent exactly one byte (8 bits), so the byte 11111111 becomes FF. You will meet hex in memory addresses, color codes (red is #FF0000), and file dumps, which is exactly where base-conversion mistakes are most costly.
When would I use octal?
Octal still shows up in Unix file permissions: a permission like 755 is octal, which equals 493 in decimal. Type 755 into the Octal field above to see the value in all four bases.
How does binary relate to the other bases?
Octal and hex are shorthand for binary: every octal digit packs exactly 3 bits and every hex digit packs exactly 4 bits. That is why the converter can re-express a long binary string — like the ones in subnet masks — as a short octal or hex value with no loss.