Hex to Decimal Converter

Convert any hexadecimal value to exact decimal instantly. Supports 0xFF, #colors, hex fractions, and values of any size — with binary output and a digit-by-digit place-value breakdown.

Share this tool

Hexadecimal Input

Accepts: 0x prefix, # prefix, spaces, underscores, radix point

Normalized Preview

Prefix: Digits:

How It Works

Hexadecimal is base-16. Each digit represents a value from 0–15, where A = 10 through F = 15.

Multiply each digit by 16 raised to its position (right-most digit = 16⁰ = 1), then sum.

Example: FF = 15×16 + 15 = 240 + 15 = 255

Hex fractions terminate exactly in decimal because 16 = 2⁴.

Quick Estimate

Client-side preview. Exact result from server.

Output Includes

  • Exact decimal — arbitrary precision, no rounding
  • Binary equivalent — each hex digit = 4 bits
  • Octal equivalent — base-8 representation
  • Place-value breakdown — digit by digit
  • Copy buttons for every result value

Digit Reference

A = 10B = 11C = 12D = 13E = 14F = 15
Quick Load:

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.

PositionPowerPlace Value (Decimal)Hex Range
0 (units)16⁰10 – F
1 (sixteens)16¹1600 – FF
2 (256s)16²256000 – FFF
3 (4096s)16³4,0960000 – FFFF
416⁴65,53600000 – FFFFF
516⁵1,048,576000000 – FFFFFF
616⁶16,777,2160000000 – FFFFFFF
716⁷268,435,45600000000 – 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.

HexDecimalBinary (4-bit)Octal
0000000
1100011
2200102
3300113
4401004
5501015
6601106
7701117
88100010
99100111
A10101012
B11101113
C12110014
D13110115
E14111016
F15111117

Common Hex Values for Developers

These values appear constantly in networking, memory addresses, color codes, and binary protocols.

HexDecimalBinaryCommon Use
0x0000000 0000Null byte, false in boolean
0x0F150000 1111Lower nibble mask
0x10160001 0000First two-digit hex value
0x7F1270111 1111Max signed 8-bit integer
0x801281000 0000Min signed 8-bit (two's complement)
0xFF2551111 1111Max byte, 255 in IPv4 subnet
0x1002560001 0000 0000First 3-digit hex value
0xFFFF655351111 1111 1111 1111Max 16-bit unsigned
0xFFFFFF1677721524-bit all onesMax 24-bit / full-white #FFFFFF
0xDEADBEEF373592855932-bit patternClassic 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.