Hex Converter

Base 10 vs. base 16

Decimal (base 10) uses digits 0–9. Hexadecimal (base 16) extends that with A–F to represent 10–15, so a single hex digit covers the same range as two decimal digits' worth of possible values in half the characters — the reason hex shows up in memory addresses, color codes, and byte-level data.

Worked example: decimal to hex

255 in decimal converts to FF in hex: 255 = (15 × 16) + 15, and 15 is represented as F, giving FF. This is also why FF is the maximum value of a single byte (2⁸ - 1 = 255) — a fact worth knowing if you work with RGB color codes, where each channel maxes out at FF.

Worked example: hex to decimal

Hex A3 converts to decimal by reading it as (A × 16) + 3, where A = 10: (10 × 16) + 3 = 163. Each position in a hex number is a power of 16, the same way each position in a decimal number is a power of 10.

Input rules

The hex field accepts only 0–9 and A–F (case-insensitive); anything else triggers a validation alert. The decimal field accepts standard numeric input. Converting in one field doesn't clear the other, so you can compare values side by side.