Hex to Decimal Converter — Free Online Hex Decoder
Hexadecimal is everywhere in computing — memory addresses, color codes, file signatures, Unicode codepoints, CPU registers, and network MAC addresses. Our free Hex to Decimal Converter instantly translates any hexadecimal value to its decimal equivalent, along with binary and octal representations in a single lookup.
What Is Hexadecimal?
Hexadecimal (hex) is a base-16 number system. Unlike the decimal system (base-10, digits 0–9) or binary (base-2, digits 0–1), hexadecimal uses 16 symbols: the digits 0–9 and the letters A–F (where A=10, B=11, C=12, D=13, E=14, F=15).
One hex digit represents exactly 4 binary bits (a “nibble”), so two hex digits perfectly represent one byte (8 bits). This makes hex an extremely natural representation for binary data — far more compact than raw binary yet mechanically convertible.
Examples of hex in everyday computing:
- CSS colors:
#3498DB(blue),#FF0000(red),#000000(black) - MAC addresses:
00:1A:2B:3C:4D:5E - IPv6 addresses:
2001:0db8:85a3:0000:0000:8a2e:0370:7334 - Unicode:
U+1F600(😀 emoji) - x86 CPU registers:
EAX = 0x00FF1234 - File magic bytes:
89 50 4E 47(PNG),FF D8 FF(JPEG),47 49 46 38(GIF)
How to Use the Hex to Decimal Converter
- Enter a hexadecimal value in the input field (with or without
0xprefix, with or without#) - The tool instantly displays:
- Decimal equivalent
- Binary equivalent (zero-padded to nearest byte)
- Octal equivalent
- Copy any result with the Copy button
Input is case-insensitive: FF, ff, and Ff all produce the same output.
Hex to Decimal Conversion Table
| Hex | Decimal | Binary | Octal |
|---|---|---|---|
0 | 0 | 0000 | 0 |
1 | 1 | 0001 | 1 |
9 | 9 | 1001 | 11 |
A | 10 | 1010 | 12 |
F | 15 | 1111 | 17 |
10 | 16 | 0001 0000 | 20 |
1F | 31 | 0001 1111 | 37 |
FF | 255 | 1111 1111 | 377 |
100 | 256 | 0001 0000 0000 | 400 |
FFFF | 65535 | 1111 1111 1111 1111 | 177777 |
FFFFFF | 16777215 | 24 ones | 77777777 |
Manual Conversion Method
To convert hex to decimal manually, use positional notation. Each hex digit position represents a power of 16:
Example: Convert 3A2F to decimal
| Position | Hex Digit | × Power of 16 | = Decimal Value |
|---|---|---|---|
| 3 (leftmost) | 3 | × 16³ = × 4096 | 12,288 |
| 2 | A (=10) | × 16² = × 256 | 2,560 |
| 1 | 2 | × 16¹ = × 16 | 32 |
| 0 (rightmost) | F (=15) | × 16⁰ = × 1 | 15 |
Total: 12,288 + 2,560 + 32 + 15 = 14,895
So 3A2F (hex) = 14895 (decimal)
Common Use Cases
CSS Color Values — #FF5733 breaks down into R=255, G=87, B=51. Understanding hex-to-decimal is essential for working with CSS colors programmatically.
Byte Mask Analysis — Bitmasks like 0xFF, 0x0F, and 0xF0 are standard in low-level programming. Converting them to binary reveals which bits are being masked.
Memory Address Debugging — Debuggers display memory addresses and register values in hex. Converting to decimal helps calculate offsets and sizes.
IPv6 and MAC Address Analysis — Breaking down hex segments of network identifiers.
Unicode Codepoints — U+0041 = decimal 65 = ‘A’. Understanding hex codepoints lets you work with any Unicode character.
Frequently Asked Questions
What is the maximum hex value this tool can convert?
The tool handles arbitrarily large hex values. For very large numbers (beyond JavaScript’s Number.MAX_SAFE_INTEGER = 2^53−1), precision may be affected. For cryptographic or large integer work, use a big-integer library.
What does the 0x prefix mean?
In programming languages (C, C++, JavaScript, Python, etc.), the prefix 0x or 0X indicates that the following number is hexadecimal. This tool accepts hex input with or without the 0x prefix.
Is hex the same as Base64?
No. Hex (base-16) uses characters 0–9 and A–F. Base64 uses a 64-character alphabet (A–Z, a–z, 0–9, +, /) to encode binary data more compactly. One Base64 character encodes 6 bits; one hex character encodes 4 bits.
Why do programmers use hex instead of decimal for binary data?
Because hex is a power of 2 (2⁴ = 16), each hex digit maps directly to exactly 4 binary bits. This makes the conversion between hex and binary trivial and maintains a compact, readable representation. Decimal values do not align conveniently with binary bit boundaries.
How does hex relate to RGB color values?
CSS hex colors like #3498DB are three concatenated hex byte values: R=34=52, G=98=152, B=DB=219. This directly corresponds to rgb(52, 152, 219). Understanding hex-to-decimal directly enables you to interpret and manipulate CSS colors.