Hex to Decimal Converter — Convert Hexadecimal Numbers Instantly (With Chart)
Last updated: April 20267 min readConverter Tools
To convert hex to decimal, multiply each digit by its power of 16. For example, hex 1A3 = (1 x 256) + (10 x 16) + (3 x 1) = 419. Remember: A=10, B=11, C=12, D=13, E=14, F=15. Or use our converter for instant results.
Hexadecimal shows up everywhere — CSS colors, memory addresses, MAC addresses, error codes, hash values. If you work with computers at any level, you will run into hex. This guide teaches you the conversion method, gives you a reference chart, and points you to a free tool that does the work instantly.
Hex Digit Values
Hexadecimal is base-16, which means it needs 16 digits. The first ten are familiar (0-9), and the remaining six use letters:
| Hex Digit | Decimal Value | Binary (4 bits) |
|---|
| 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 |
Hex to Decimal Reference Chart
Key hex values every developer encounters, with their decimal equivalents:
| Hex | Decimal | Where You See It |
|---|
| 0x0A | 10 | Newline character (ASCII LF) |
| 0x0D | 13 | Carriage return (ASCII CR) |
| 0x20 | 32 | Space character (ASCII) |
| 0x41 | 65 | Letter A (ASCII uppercase) |
| 0x61 | 97 | Letter a (ASCII lowercase) |
| 0x7F | 127 | DEL character / signed byte max |
| 0x80 | 128 | Start of extended ASCII |
| 0xFF | 255 | Max value for one byte (8 bits) |
| 0x100 | 256 | One byte overflow point |
| 0x200 | 512 | — |
| 0x400 | 1,024 | 1 KB boundary |
| 0x3E8 | 1,000 | — |
| 0xFFFF | 65,535 | Max unsigned 16-bit value |
| 0x10000 | 65,536 | Unicode BMP boundary |
| 0xFFFFFF | 16,777,215 | Total RGB colors (24-bit) |
| 0x7FFFFFFF | 2,147,483,647 | Max signed 32-bit integer |
The Conversion Method
Hex to decimal conversion follows the same pattern as binary to decimal, but with base 16 instead of base 2.
- Write out the hex number and label each digit position from right to left, starting at 0
- Convert any letters to their decimal values (A=10, B=11, C=12, D=13, E=14, F=15)
- Multiply each digit by 16 raised to its position number
- Add all the results together
Example 1: Convert hex 2F to decimal
Positions: digit 0 = F (15), digit 1 = 2
- (2 x 16^1) = 2 x 16 = 32
- (15 x 16^0) = 15 x 1 = 15
32 + 15 = 47. Hex 2F = decimal 47.
Example 2: Convert hex 1A3 to decimal
- (1 x 16^2) = 1 x 256 = 256
- (10 x 16^1) = 10 x 16 = 160
- (3 x 16^0) = 3 x 1 = 3
256 + 160 + 3 = 419. Hex 1A3 = decimal 419.
Example 3: Convert hex FF5733 to decimal
This is a CSS color code. Breaking it into RGB bytes is more practical:
- FF = (15 x 16) + 15 = 255 (red channel)
- 57 = (5 x 16) + 7 = 87 (green channel)
- 33 = (3 x 16) + 3 = 51 (blue channel)
As a single number: FF5733 = 16,733,491. But in practice, you convert CSS hex colors byte-by-byte into their RGB values: rgb(255, 87, 51).
Where You See Hex Every Day
Hexadecimal is not some academic oddity. If you touch code, networks, or design, you use it constantly:
- CSS colors — #FF5733, #000000, #FFFFFF. The format is #RRGGBB where each pair of hex digits represents a color channel from 00 (0) to FF (255).
- Memory addresses — debuggers show addresses like 0x7FFF5FBFF8A0. These are raw memory locations in hex because showing them in binary would require 64 digits, while hex uses only 16.
- MAC addresses — every network device has a MAC address like AA:BB:CC:DD:EE:FF. Each pair is one hex byte. A full MAC address is 6 bytes (48 bits).
- Unicode characters — U+0041 is the letter "A", U+1F600 is a grinning face emoji. Unicode code points are written in hex because the range (0 to 1,114,111) is much cleaner in hex (0 to 10FFFF) than decimal.
- File headers (magic bytes) — PDF files start with hex 25 50 44 46 (which is "%PDF" in ASCII). PNG files start with 89 50 4E 47. These hex signatures identify file types regardless of the file extension.
Decimal to Hex — The Reverse Method
To convert decimal to hex, repeatedly divide by 16:
- Divide the decimal number by 16
- Write down the remainder (convert 10-15 to A-F)
- Take the quotient and divide by 16 again
- Repeat until the quotient is 0
- Read the remainders from bottom to top
Example: Convert 500 to hex
- 500 / 16 = 31 remainder 4
- 31 / 16 = 1 remainder 15 (F)
- 1 / 16 = 0 remainder 1
Reading bottom to top: 1F4. Decimal 500 = hex 1F4.
Hex in Web Development
The most common place non-programmers encounter hex is CSS colors. Here is how the #RRGGBB format works:
- Each color channel (Red, Green, Blue) gets two hex digits
- Two hex digits give you 256 possible values per channel (00 to FF)
- Three channels with 256 values each = 256 x 256 x 256 = 16,777,216 possible colors
- #000000 = black (all channels at 0). #FFFFFF = white (all channels at 255).
- #FF0000 = pure red. #00FF00 = pure green. #0000FF = pure blue.
- CSS also supports shorthand: #F00 expands to #FF0000 (each digit is doubled)
Modern CSS supports rgba() with decimal values and an alpha channel, but hex remains the most widely used format because it is compact and universally supported.
Hex in Debugging
When debugging crashes, memory corruption, or binary protocols, hex is your lens into raw data:
- Memory dumps show each byte as two hex digits. A 16-byte row like
48 65 6C 6C 6F 20 57 6F 72 6C 64 translates to "Hello World" in ASCII.
- Error codes in Windows (HRESULT) and system calls are typically hex: 0x80004005 = "Unspecified error." The hex format makes it easier to look up the specific bit flags.
- Network packets captured by tools like Wireshark display payload data in hex. Each byte pair is one character or data unit in the protocol.
- Hash values — MD5 produces a 128-bit hash displayed as 32 hex characters. SHA-256 produces 64 hex characters. Hex is the standard display format for all cryptographic output.
Convert Hex Values Instantly