Hex to Decimal

Convert hex to decimal.

A hex code like 1A2B or FF is compact and computer-friendly but not something most people can read at a glance. This tool converts hexadecimal back into the decimal numbers everyday arithmetic uses.

Reversing a shorthand built for binary, not for people

Hexadecimal was never designed for human intuition — it was designed as an efficient, compact stand-in for binary data, since each of its digits maps exactly onto four bits. That efficiency is exactly why it doesn't translate intuitively into decimal: converting hex to decimal requires understanding that each position represents a power of 16 rather than a power of 10, a genuinely unfamiliar mental model for most people encountering it outside a computer science context.

How the conversion is calculated

Each hex digit (0-9, A-F) is multiplied by 16 raised to the power of its position (counting from the right, starting at 0), and the results are summed. For example, the hex value 2F converts as (2 × 16^1) + (15 × 16^0) = 32 + 15 = 47 in decimal — note that "F" represents 15, one of the six extended hex digits beyond ordinary 0-9.

Where converting hex to decimal is genuinely useful

  • Understanding a color's true RGB values — converting each pair of digits in a hex color code (like #1a73e8) into its decimal RGB equivalent to understand or manipulate the actual color numerically.
  • Reading error codes and memory dumps — translating a hexadecimal error code or memory address from technical documentation into a decimal value that's easier to look up or compare against other numeric data.
  • Networking and IP calculations — some network configurations and IPv6 addresses use hexadecimal notation that occasionally needs converting to decimal for calculation or comparison purposes.
  • Computer science and programming education — a core skill for understanding how the same underlying binary data can be represented in multiple equivalent number systems.

Frequently asked questions

What does the hex value FF equal in decimal? 255 — the maximum value representable by two hex digits (or, equivalently, eight bits), which is why 255 shows up constantly in computing contexts like the maximum value of an RGB color channel or an 8-bit integer.

Is hexadecimal case-sensitive? No — the letters A through F can be written in either uppercase or lowercase without changing the value; lowercase has become the more common convention in modern code and CSS, but both are universally understood.

Why do error codes often use hex instead of decimal? Because error codes frequently encode multiple pieces of information packed into different bit ranges of a single value (flags, categories, severity levels), and hexadecimal preserves visibility into those underlying binary boundaries far better than an opaque decimal number would.

Further reading