Hexadecimal to Decimal Converter
Type into any box and the other three follow. The working is shown below.
Why hexadecimal exists at all
Computers work in binary, and binary is unreadable for humans. The number 255 is 11111111, which nobody can scan at a glance or dictate over the phone.
Hexadecimal solves that with one useful property: sixteen is two to the fourth, so one hex digit is exactly four binary digits. Always, with no arithmetic. That makes converting between binary and hex a matter of grouping rather than calculating.
1111 1111 → F F → 255
Split the binary into groups of four from the right, translate each group, and you are done. It is why memory addresses, colour codes and byte values are all written in hex: it is binary, made readable, with no information lost.
The sixteen digits
Decimal runs out of symbols after 9, so hexadecimal borrows letters for the values ten to fifteen: A, B, C, D, E, F. So F is 15, and FF is 15×16 + 15 = 255 — the largest value a single byte can hold, which is why 255 turns up everywhere.
Octal, and why it mostly faded
Octal is base 8, so one octal digit is three binary digits. It made sense on machines with word sizes divisible by three, and it survives in Unix file permissions, where 755 and 644 are octal. Once eight-bit bytes became standard, hexadecimal's four-bit digits fitted better and octal largely disappeared.
How to use it
- Type into any of the four boxes. The other three update as you go.
- Prefixes are handled. 0x, 0b and 0o are stripped automatically, so pasting from code works.
- Invalid digits are caught. Typing a G into the hex box tells you rather than silently producing nonsense.
- Read the working below to see the place-value expansion and the repeated-division method, both updating with your number.
Common uses and tips
Where you meet each base
- Colour codes. #FF5733 is three bytes: red 255, green 87, blue 51.
- Memory addresses and debugging, always hex.
- Unix permissions, octal: 755 is rwxr-xr-x.
- Network masks and flags, where binary makes the bit pattern visible.
- Character codes. Unicode points are written as U+0041 — hex for 65, which is capital A.
Numbers worth recognising
- FF = 255 — one full byte
- FFFF = 65,535 — two bytes
- 80 = 128 — the top bit of a byte set
- 400 = 1,024 — a binary kilobyte
- 7F = 127 — the largest signed byte, and the end of ASCII
Converting in your head
Hex to decimal: multiply the first digit by 16 and add the second. A3 is 10×16 + 3 = 163.
Decimal to hex: divide by 16 and keep the remainder. 200 ÷ 16 is 12 remainder 8, so C8.
What this tool can and cannot see
Everything here runs in your browser. Nothing about your numbers is sent anywhere, stored, or logged — the page has no server to send it to.
The working, step by step
Every line updates with whatever you type above.
Questions people ask
Why does hexadecimal use letters?
Because base 16 needs sixteen digit symbols and decimal only supplies ten. A to F stand for the values ten to fifteen.
What is FF in decimal?
255 — the largest value a single byte can hold, which is why it appears constantly in colour codes and byte values.
Why is hex used instead of binary?
Because one hex digit is exactly four binary digits, so it is binary with nothing lost and four times fewer characters to read.
What is octal used for now?
Mainly Unix file permissions, where 755 and 644 are octal numbers. One octal digit is three binary digits.
How do I convert hex to decimal by hand?
Multiply each digit by its place value — powers of 16 from the right. A3 is 10×16 + 3 = 163.