This Hex Calculator converts non-negative whole numbers between hexadecimal (base 16) and decimal (base 10). Select the direction, enter a decimal integer or hexadecimal digit string, and read the equivalent value. It does not currently perform hexadecimal addition, multiplication or signed two’s-complement interpretation.
How to Use the Hex Calculator
- Select Decimal → Hex or Hex → Decimal.
- For decimal-to-hex, enter a non-negative safe integer.
- For hex-to-decimal, enter digits 0–9 and A–F; uppercase and lowercase are accepted and spaces are ignored.
- Read the converted value. Decimal-to-hex output is displayed in uppercase.
Hexadecimal Place Values
Hexadecimal is base 16. Its digits are 0–9 and A–F, where A=10, B=11, C=12, D=13, E=14 and F=15. Each position represents a power of 16:
Hex value = Σ(digit × 16⁽position⁾)
Worked Examples
- Hex to decimal: FF₁₆ = 15×16 + 15 = 255.
- Hex to decimal: 2A₁₆ = 2×16 + 10 = 42.
- Decimal to hex: 255₁₀ = FF₁₆.
Hexadecimal, Bytes and RGB Color Values
One hexadecimal digit represents four binary bits, so two hex digits represent one byte (8 bits) and range from 00 to FF. For example, 2A₁₆ is 42₁₀, while FF₁₆ is 255₁₀. A six-digit web color such as #1E90FF is three byte pairs—red 1E, green 90 and blue FF—not one ordinary integer conversion input.
Hexadecimal converters such as Omni Calculator's Hexadecimal Converter explain conversion among decimal, hexadecimal and binary. Broader base converters may support several radices or signed formats. This widget accepts a plain hexadecimal digit string only: remove 0x and # prefixes, and split color channels yourself before converting them individually.
Where Hexadecimal Is Used
Hexadecimal is common in memory addresses, debugging output, byte values and web color notation. A six-digit RGB color such as #1E90FF contains three two-digit hexadecimal channels. The current widget converts a numeric hex string; it does not parse CSS color syntax or split RGB channels.
Competitor review covered RapidTables, Omni Calculator, Maaz Zindani and quickhex. Broader converters support more bases, binary/octal outputs, fractions, signed two's-complement values, text conversion or batch workflows. This guide now adds byte-level interpretation and explains why a CSS color such as #1E90FF must be split into RGB byte pairs rather than entered as one plain numeric hex value. The widget remains a two-way unsigned integer converter.
For base-2 conversion, use the Binary Calculator.
Assumptions and Limitations
- Decimal inputs must be non-negative safe integers; fractional and negative values are not supported.
- Hex input accepts 0–9 and A–F only, after whitespace is removed.
- The input does not accept a 0x prefix or CSS # prefix.
- Hex values are interpreted as unsigned magnitudes, not signed fixed-width values.
- The tool does not add, subtract or multiply hexadecimal numbers.
