Converting...
Enter a hexadecimal number to see its exact decimal value and place-value breakdown.
How to Convert Hexadecimal to Decimal
Hexadecimal (base-16) uses sixteen symbols: the digits 0 through 9 plus the letters A through F, where A = 10, B = 11, C = 12, D = 13, E = 14, and F = 15.
To convert a hex number to decimal, multiply each digit by 16 raised to the power of its position, where the rightmost digit is at position 0. Then add all the results together.
Example — FF to decimal:
F × 16¹ = 15 × 16 = 240
F × 16⁰ = 15 × 1 = 15
Total = 240 + 15 = 255
Example — 1A to decimal:
1 × 16¹ = 1 × 16 = 16
A × 16⁰ = 10 × 1 = 10
Total = 16 + 10 = 26
In JavaScript you can convert hex to decimal in one call: parseInt('FF', 16) returns 255. See the MDN parseInt() reference for full details on the radix parameter.
Hex Place Value Chart
Each position in a hexadecimal number is a power of 16. This table shows the place values for positions 0 through 7.
| Position | Power | Place Value (Decimal) | Hex Range |
|---|---|---|---|
| 0 (units) | 16⁰ | 1 | 0 – F |
| 1 (sixteens) | 16¹ | 16 | 00 – FF |
| 2 (256s) | 16² | 256 | 000 – FFF |
| 3 (4096s) | 16³ | 4,096 | 0000 – FFFF |
| 4 | 16⁴ | 65,536 | 00000 – FFFFF |
| 5 | 16⁵ | 1,048,576 | 000000 – FFFFFF |
| 6 | 16⁶ | 16,777,216 | 0000000 – FFFFFFF |
| 7 | 16⁷ | 268,435,456 | 00000000 – FFFFFFFF |
How to Convert a Hex Fraction to Decimal
Fractional hex digits sit to the right of the radix point and use negative powers of 16: the first digit after the point is multiplied by 16⁻¹ (= 1/16 = 0.0625), the second by 16⁻² (= 1/256), and so on.
Because 16 = 2⁴, every hex fraction terminates exactly in decimal — no repeating digits, no rounding.
Example — A.8 to decimal:
A × 16⁰ = 10 × 1 = 10
8 × 16⁻¹ = 8 × 1/16 = 0.5
Total = 10 + 0.5 = 10.5
Hex Digits A–F Reference Table
The letters A–F extend the digit set beyond 9. Each letter maps to a 4-bit binary nibble. The formal definition is documented in the NIST Dictionary of Algorithms and Data Structures.
| Hex | Decimal | Binary (4-bit) | Octal |
|---|---|---|---|
| 0 | 0 | 0000 | 0 |
| 1 | 1 | 0001 | 1 |
| 2 | 2 | 0010 | 2 |
| 3 | 3 | 0011 | 3 |
| 4 | 4 | 0100 | 4 |
| 5 | 5 | 0101 | 5 |
| 6 | 6 | 0110 | 6 |
| 7 | 7 | 0111 | 7 |
| 8 | 8 | 1000 | 10 |
| 9 | 9 | 1001 | 11 |
| A | 10 | 1010 | 12 |
| B | 11 | 1011 | 13 |
| C | 12 | 1100 | 14 |
| D | 13 | 1101 | 15 |
| E | 14 | 1110 | 16 |
| F | 15 | 1111 | 17 |
Common Hex Values for Developers
These values appear constantly in networking, memory addresses, color codes, and binary protocols.
| Hex | Decimal | Binary | Common Use |
|---|---|---|---|
| 0x00 | 0 | 0000 0000 | Null byte, false in boolean |
| 0x0F | 15 | 0000 1111 | Lower nibble mask |
| 0x10 | 16 | 0001 0000 | First two-digit hex value |
| 0x7F | 127 | 0111 1111 | Max signed 8-bit integer |
| 0x80 | 128 | 1000 0000 | Min signed 8-bit (two's complement) |
| 0xFF | 255 | 1111 1111 | Max byte, 255 in IPv4 subnet |
| 0x100 | 256 | 0001 0000 0000 | First 3-digit hex value |
| 0xFFFF | 65535 | 1111 1111 1111 1111 | Max 16-bit unsigned |
| 0xFFFFFF | 16777215 | 24-bit all ones | Max 24-bit / full-white #FFFFFF |
| 0xDEADBEEF | 3735928559 | 32-bit pattern | Classic debug magic number |
Frequently Asked Questions
How do you convert hex to decimal?
Write out each hex digit from left to right. Multiply each digit by 16 raised to the power of its position (starting from 0 at the right). Add all the products. For example, A3 = 10×16 + 3×1 = 160 + 3 = 163.
What is FF in decimal?
FF in hexadecimal equals 255 in decimal. It is the maximum value of an 8-bit unsigned integer and is widely used in networking (subnet mask 255.255.255.0) and color channels (full red in RGB is #FF0000).
What is 0xFF in decimal?
0xFF is exactly the same value as FF — the 0x prefix is simply the C-style notation that tells a reader (or compiler) that the number is hexadecimal. The decimal value is 255.
How do you convert a hex color like #1A2B3C to decimal?
Strip the # prefix and treat the six-digit string as a standard hex number: 1A2B3C = 1×16⁵ + A×16⁴ + 2×16³ + B×16² + 3×16¹ + C×16⁰ = 1,048,576 + 655,360 + 8,192 + 2,816 + 48 + 12 = 1,715,004. This tool accepts the # prefix directly. The official hex color notation syntax is defined in the W3C CSS Color Level 4 specification.
Why does hexadecimal use letters A to F?
Base-16 requires sixteen unique digit symbols. The Arabic numerals only give ten (0–9), so the Latin letters A–F were appended to cover values 10–15. The convention was established in the 1950s and 1960s alongside the rise of digital computing, and it has been the standard ever since.
Can this tool handle values larger than 64 bits?
Yes. This converter uses Go's math/big package for arbitrary-precision arithmetic. It accepts integer portions up to 1,024 hex digits (approximately 4,096 bits) and fractional portions up to 64 hex digits without overflow or rounding.
Further Reading
Authoritative references for developers, students, and network engineers who want to go deeper.
MDN Web Docs — parseInt(string, radix)
Complete reference for JavaScript's built-in hex-to-decimal function, including radix handling and edge cases.
W3C CSS Color Level 4 — Hex Color Notation
Official W3C specification defining how 3-, 4-, 6-, and 8-digit hex values encode RGB and alpha color channels.
NIST — Hexadecimal Representation (Dictionary of Algorithms)
Formal computer-science definition of hexadecimal representation from the US National Institute of Standards and Technology.
IETF RFC 5952 — IPv6 Address Text Representation
The IETF standard specifying how 128-bit IPv6 addresses are written as colon-separated hex groups, with rules for zero compression.
Go Standard Library — math/big
Official documentation for Go's arbitrary-precision integer and rational number types, which power the exact calculations in this tool.