RGB color codes
color: #ff8800;color: rgb(255, 136, 0);Each pair of hex digits is one byte (0–255) for one channel. ff = 255, 88 = 136, 00 = 0.
Convert numbers between binary, octal, decimal, and hexadecimal.
Last updated
A number base converter takes a number written in one numeral system — binary, octal, decimal, or hexadecimal — and rewrites it in any of the others. Developers reach for it when reading bitmasks, debugging color codes, decoding flags in protocol packets, working with hardware registers, and translating between hex and decimal in everything from CSS to assembly to crypto.
The number itself doesn't change between bases — only the *representation* does. 255 in decimal is 0xFF in hex, 0b11111111 in binary, and 0o377 in octal. They are four different ways of writing the same value.
Modern tools should handle big numbers without precision loss. JavaScript's regular parseInt silently rounds anything past 2⁵³, which causes subtle bugs with 64-bit register values, IDs, and timestamps. A solid converter uses BigInt under the hood so a 256-bit hex value round-trips perfectly.
0xCAFE is 1100 1010 1111 1110 in binary — easier on the eyes.Choose binary, octal, decimal, or hexadecimal — whichever matches the number you have.
Hex accepts both ff and 0xff. Binary accepts both 1010 and 0b1010. The converter strips the prefix automatically.
All four representations of the same number appear instantly. Click any one to copy it.
Group binary by 4 bits (1100 1010 1111 1110) and hex by 2 chars (CA FE). Useful for inspecting bitfields and dumps.
Common reference values across all four bases. JavaScript's BigInt and numeric literal grammar cover the syntax used below.
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 8 | 1000 | 10 | 8 |
| 10 | 1010 | 12 | A |
| 16 | 10000 | 20 | 10 |
| 32 | 100000 | 40 | 20 |
| 64 | 1000000 | 100 | 40 |
| 100 | 1100100 | 144 | 64 |
| 128 | 10000000 | 200 | 80 |
| 255 | 11111111 | 377 | FF |
| 256 | 100000000 | 400 | 100 |
| 1024 | 10000000000 | 2000 | 400 |
| 65535 | 1111111111111111 | 177777 | FFFF |
color: #ff8800;color: rgb(255, 136, 0);Each pair of hex digits is one byte (0–255) for one channel. ff = 255, 88 = 136, 00 = 0.
5
0b101
Bit 0 (read) is set, bit 2 (execute) is set, bit 1 (write) is not. So permissions are read + execute.
Unix file modes (chmod), feature flags, and protocol packets all encode multiple booleans as bits in a single integer. Binary view makes that visible.
0xFFFFFFFFFFFFFFFF
18446744073709551615
This is the maximum unsigned 64-bit integer. JavaScript's normal parseInt would lose precision; BigInt handles it cleanly.
0x10 and 10 look similar but are 16 and 10 — always include the base prefix in code.parseInt(big, 16) in JavaScript on values larger than 2⁵³. Use BigInt('0x' + hex) instead.1010: 1·8 + 0·4 + 1·2 + 0·1 = 10. Or paste it into a base converter for the instant answer.255 ÷ 16 = 15 remainder 15 → FF.#ff8800), memory addresses, file dumps, MAC addresses, hashes, and most low-level systems.0755) and some C-family number literals.