Hex to decimal — base-16 to base-10
Paste any hexadecimal value, with or without a 0x prefix, and this tool
returns the decimal (base 10) number, plus the binary and octal
equivalents. Hexadecimal is the compact base programmers use for colours, memory
addresses, and byte data, because each digit maps neatly to four binary bits.
How it works
The tool strips an optional 0x prefix and any spaces, checks the remaining text
contains only valid hex digits (0–9, A–F), and parses it as base 16. Internally
each digit contributes its value times a power of sixteen: the rightmost digit is
16⁰ = 1, the next is 16¹ = 16, then 16² = 256, and so on. The decimal result is
the sum, and the binary and octal forms are derived from the same number. If a
value exceeds the safe-integer range it is rejected to avoid silent rounding.
Example
Convert 0xBEEF:
- B = 11 → 11 × 16³ = 45056
- E = 14 → 14 × 16² = 3584
- E = 14 → 14 × 16¹ = 224
- F = 15 → 15 × 16⁰ = 15
- Total = 48879
| Hex | Decimal | Binary | Octal |
|---|---|---|---|
| F | 15 | 1111 | 17 |
| FF | 255 | 11111111 | 377 |
| 100 | 256 | 100000000 | 400 |
| BEEF | 48879 | 1011111011101111 | 137357 |
Everything runs in your browser — nothing is uploaded.