Hex ↔ Decimal Converter
Convert between hexadecimal, decimal, binary, and octal. All four update simultaneously as you type.
Paste multiple numbers (one per line), select the input base, and convert all at once.
| HEX | DEC | BIN | OCT | Notes |
|---|---|---|---|---|
| 00 | 0 | 00000000 | 0 | Zero / null |
| 0F | 15 | 00001111 | 17 | Lower nibble |
| 10 | 16 | 00010000 | 20 | |
| 1F | 31 | 00011111 | 37 | |
| 20 | 32 | 00100000 | 40 | Space (ASCII) |
| 40 | 64 | 01000000 | 100 | @ (ASCII) |
| 7F | 127 | 01111111 | 177 | DEL (ASCII) |
| 80 | 128 | 10000000 | 200 | Sign bit (8-bit signed) |
| A0 | 160 | 10100000 | 240 | |
| C0 | 192 | 11000000 | 300 | Common subnet mask byte |
| FF | 255 | 11111111 | 377 | Max byte / 8-bit unsigned |
| 100 | 256 | 100000000 | 400 | |
| FFFF | 65535 | 1111111111111111 | 177777 | Max 16-bit unsigned |
How to use
- Type in any of the four fields (HEX, Decimal, Binary, Octal) — all others update instantly
- If the hex value looks like a CSS color (#RRGGBB or RRGGBB), a color swatch preview appears
- Use the Batch Converter to convert many numbers at once — paste one per line, select the base, and click Convert All
- The reference table shows common hex values and their equivalents in all bases
- Hex input is case-insensitive (A = a)
About this Hex to Decimal Converter
Hexadecimal (base 16) uses sixteen digits — 0 through 9, then A through F for values 10 through 15 — instead of the ten digits used in decimal (base 10). It's the standard way to represent color codes, memory addresses, and byte values because it maps cleanly onto binary.
Why hex maps neatly to binary
One hex digit represents exactly 4 binary bits (since 16 = 2⁴), so a full byte (8 bits) converts to exactly 2 hex digits. This clean relationship is why programmers use hex as a compact, human-readable shorthand for binary data instead of writing out long strings of 1s and 0s.
Worked example
Converting hex FF to decimal: F represents 15, and in the two-digit place, the value is (15 × 16) + 15 = 240 + 15 = 255. This is why FF appears constantly in web colors and byte values — it's the maximum value a single byte (8 bits) can hold.
Where hex shows up
- CSS colors: #FF0000 is pure red, where each pair of hex digits represents red, green, and blue channel values from 0–255
- Memory addresses and pointers in low-level programming and debugging
- MAC addresses and some network identifiers
- Character encoding references, like Unicode code points