Hex to decimal converter
Hexadecimal to decimal, exact at any length — plus binary and octal.
| Binary | 11111111 | |
| Octal | 377 | |
| Decimal | 255 | |
| Hexadecimal | ff |
Convert hexadecimal to decimal
Paste a hex value — with or without 0x, upper- or lowercase — and read its decimal value, with binary and octal alongside. Memory addresses, error codes, Unicode code points and byte values all turn up in hex; the conversion is exact at any length.
How hex to decimal works
Hexadecimal has sixteen digits: 0–9, then A–F for 10–15. Each position is worth sixteen times the one to its right — 1, 16, 256, 4096 — so you multiply and add:
1F4 = 1×256 + 15×16 + 4×1 = 500.
Two hex digits make exactly one byte (00–FF, 0–255), which is why hex is the standard way to write bytes, colours and hashes. A colour code like #2E8B57 is three separate bytes rather than one number; the HEX to RGB converter splits it into its red, green and blue values.
Other conversions with this tool
How to convert hex to decimal
- 1
Type or paste a hex number (0x optional).
- 2
Read the decimal value in the table.
- 3
Copy any result with one click.
Hex to Decimal — frequently asked questions
How do you convert hex to decimal by hand?
Multiply each digit by its power of 16, with A–F meaning 10–15. For 2F: 2×16 + 15 = 47.
Is it case-sensitive?
No. ff, FF and 0xFF all give 255.
Can it convert a hex colour like #2E8B57?
Not as a colour: a hex colour packs three separate values into one code. Use the HEX to RGB converter to get the red, green and blue numbers.