Hex to Decimal Converter - Hexadecimal to Number
—————Convert Hexadecimal Numbers to Decimal
Paste a hex value such as 0x1A3F, ff or a
grouped value like DEAD BEEF, and the decimal result
appears as you type, with binary and octal underneath. The
conversion is exact for any length, so 64-bit IDs, memory addresses and
hash prefixes are safe to convert.
How to Convert Hex to Decimal by Hand
Hexadecimal is base 16. Each position is worth 16 times the position to its right: 1, 16, 256, 4096, 65536 and so on. Replace any letter with its value (A=10 to F=15), multiply each digit by its place value, and add.
Worked example: 0x2F3A
- 2 is in the 4096s place: 2 × 4096 = 8192.
- F (15) is in the 256s place: 15 × 256 = 3840.
- 3 is in the 16s place: 3 × 16 = 48.
- A (10) is in the 1s place: 10 × 1 = 10.
- Add them: 8192 + 3840 + 48 + 10 = 12090.
For long values, the running-total method is quicker: start at 0, and for each digit multiply the total by 16 and add the digit. For 2F3A: 2, 47, 755, 12090.
Hex Digit Values
| Hex | Decimal | Binary |
|---|---|---|
| 0 | 0 | 0000 |
| 1 | 1 | 0001 |
| 2 | 2 | 0010 |
| 3 | 3 | 0011 |
| 4 | 4 | 0100 |
| 5 | 5 | 0101 |
| 6 | 6 | 0110 |
| 7 | 7 | 0111 |
| 8 | 8 | 1000 |
| 9 | 9 | 1001 |
| A | 10 | 1010 |
| B | 11 | 1011 |
| C | 12 | 1100 |
| D | 13 | 1101 |
| E | 14 | 1110 |
| F | 15 | 1111 |
Common Hex Values
| Hex | Decimal |
|---|---|
| 0x7F | 127 |
| 0x80 | 128 |
| 0xFF | 255 |
| 0x100 | 256 |
| 0x3E8 | 1,000 |
| 0x400 | 1,024 |
| 0x7FFF | 32,767 |
| 0xFFFF | 65,535 |
| 0x10000 | 65,536 |
| 0xFFFFFF | 16,777,215 |
| 0x7FFFFFFF | 2,147,483,647 |
| 0xFFFFFFFF | 4,294,967,295 |
Hex Notations You Will See
The same hex number is written differently depending on where it
appears. Programming languages use a 0x prefix
(0x1F). CSS colours use #
(#1F1F1F). HTML character references use
, Unicode uses U+1F600, assembly
listings may add an h suffix (1Fh), and
strings in C or Python use \x1F for single bytes. In every
case the digits after the marker are ordinary base-16. The converter strips a leading
0x for you; remove any other marker, such as
# or a trailing h, before pasting.
Where Hex Numbers Come From
Hex is used wherever bytes are written out: colour codes, memory
addresses in stack traces, error codes such as Windows
0x80070005, Unicode code points (U+00E9) and file
signatures. For the reverse direction, use the
decimal to hex converter. If your
hex represents text rather than a number, try
hex to text instead.
Related Tools
JWT Decoder
Decode JSON Web Tokens and inspect header, payload and signature.
Base64 Encode / Decode
Encode text to Base64 or decode Base64 strings back to plain text.
URL Encode / Decode
Percent-encode or decode URLs and query-string parameters safely.
Hash Generator
Generate MD5, SHA-1, SHA-256, SHA-384, and SHA-512 hashes from text.