Type a number in any base below — binary, decimal, hexadecimal, or octal — and watch the others update instantly.
This tool converts numbers between the four number systems used most often in computing and mathematics: decimal (base 10, the everyday counting system), binary (base 2, the language of computer hardware), hexadecimal (base 16, widely used in programming and color codes), and octal (base 8, used in some older computing contexts and file permissions).
Type a value into any one field, and the other three update automatically and instantly — there's no separate "convert" button to click, and no data ever leaves your browser.
If you type an invalid character for a given base — for instance, an "8" in the binary field, which only allows 0 and 1 — the calculator will flag it so you know to correct your entry.
The number system almost everyone learns first, using ten digits (0–9). Each position represents a power of 10 — ones, tens, hundreds, and so on.
Uses only two digits, 0 and 1. Every value in a computer's memory is ultimately stored as binary, because digital circuits are built from switches that are either "on" or "off." Each position represents a power of 2.
Uses sixteen symbols: 0–9 followed by A–F, where A=10, B=11, C=12, D=13, E=14, and F=15. Hex is popular in programming because each hex digit maps neatly to exactly four binary digits, making it a compact, human-readable way to represent binary data — it's also the format used for web color codes like #FF6600.
Uses eight digits, 0–7. It's less common today but still shows up in certain programming contexts and Unix/Linux file permission notation (like chmod 755).
| Decimal | Binary | Hex | Octal |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 8 | 1000 | 8 | 10 |
| 10 | 1010 | A | 12 |
| 16 | 10000 | 10 | 20 |
| 255 | 11111111 | FF | 377 |
Internally, every base is just a different way of writing the same underlying quantity. To convert, the calculator first parses your input as a number in its source base — using positional place values that are powers of that base — and then re-expresses that same quantity using the place-value system of each target base. For example, decimal 255 equals binary 11111111 because 255 = 128+64+32+16+8+4+2+1, which is exactly the sum of the first eight powers of 2 (2⁷ down to 2⁰).
This converter is designed for non-negative whole numbers, which covers the vast majority of practical use cases like color codes, memory addresses, and file permissions.
Yes, the converter handles large integers well beyond typical everyday use, though extremely large values (beyond what JavaScript can represent precisely) may lose some precision.
Because hexadecimal needs sixteen distinct symbols but our number system only has ten digits, it borrows the letters A through F to represent the values 10 through 15.
Yes — a web color code like #3498DB is simply three hexadecimal byte values (one each for red, green, and blue) written back to back.