Convert any number between binary, decimal, hexadecimal, and octal — enter a value in any base and see it in all four instantly.
Your value is first converted to decimal, regardless of which base you entered it in. From decimal, it's re-expressed in binary, hexadecimal, and octal using repeated division and remainders.
A number base (or radix) defines how many unique digits are available before carrying to the next place value. Decimal (base 10) uses 0-9; binary (base 2) uses only 0-1; hexadecimal (base 16) uses 0-9 and A-F; octal (base 8) uses 0-7.
| Decimal | Binary | Hex | Octal |
|---|---|---|---|
| 10 | 1010 | A | 12 |
| 100 | 1100100 | 64 | 144 |
| 255 | 11111111 | FF | 377 |
How do you convert decimal to binary? Repeatedly divide the number by 2 and record the remainders; reading the remainders from last to first gives the binary form. For example, 13 in binary is 1101.
How do you convert binary to hexadecimal? Group the binary digits into sets of four starting from the right, then convert each group to its hex digit. Converting through decimal first also works and is easier by hand.
What is hexadecimal used for? Hexadecimal is widely used in programming and computing to represent memory addresses, color codes (like #FF5733), and binary data compactly, since each hex digit represents exactly 4 binary bits.
What is the largest value one byte (8 bits) can hold? An 8-bit byte can represent decimal values from 0 to 255 (binary 00000000 to 11111111, or hex 00 to FF).
Why does hexadecimal use letters A-F? Hexadecimal is base 16, so it needs 16 distinct digits. After 0-9, the letters A through F represent the values 10 through 15.
Example 1 — Decimal to others: 255 → binary 11111111, hex FF, octal 377.
Example 2 — Binary input: 1101 (binary) → decimal 13, hex D, octal 15.
Example 3 — Hex input: 1A (hex) → decimal 26, binary 11010, octal 32.
| Decimal | Binary | Hex | Octal |
|---|---|---|---|
| 10 | 1010 | A | 12 |
| 47 | 101111 | 2F | 57 |
| 255 | 11111111 | FF | 377 |
Converting hex by hand: 2F = 2 × 16 + 15 = 47.
Programming languages often mark the base with a prefix: 0b for binary, 0x for hexadecimal and sometimes 0o or a leading zero for octal. Enter just the digits in the converter, and add the prefix yourself when you paste the result into code.
Why group binary digits in fours? Four bits map exactly to one hex digit, which makes conversion between binary and hex quick to do by eye.
Does hexadecimal care about upper or lower case letters? No. A-F and a-f represent the same values; the case is only a style choice.