Hex Converter tool

Hex Converter

A hexadecimal converter translates hex values (base-16) to decimal (base-10), binary (base-2), and octal (base-8).

What is a hex converter?

A hex converter reads a hexadecimal (base-16) value and shows the same number in decimal, binary, and octal. Hex digits are 0–9 and A–F, where A through F mean 10 through 15. You can type an optional 0x prefix; invalid characters trigger an error message. Memory dumps and MAC addresses often print in hex pairs for easy byte alignment. Invalid letters G through Z are rejected so you catch typos before running conversions.

How to use the Hex Converter

  1. Type hex digits in the input (0–9, A–F).
  2. Optional 0x prefix is stripped automatically.
  3. Read decimal, binary, and octal in the cards.
  4. Use the digit breakdown for place values.
  5. Check the 0–F reference table for letter values.

About this calculator

A hexadecimal converter translates hex values (base-16) to decimal (base-10), binary (base-2), and octal (base-8). Hexadecimal uses digits 0–9 and letters A–F, where A=10, B=11, C=12, D=13, E=14, F=15.

Hex is extensively used in programming for memory addresses, HTML color codes, IP addresses, and machine code because it is more compact than binary (each hex digit represents 4 binary bits).

How the math works

d=∑i=0nhi×16id = \sum_{i=0}^{n} h_i \times 16^i
  • hih_i: Hex digit at position i (0–9 or A–F)
  • 16i16^i: Place value in base 16
  • dd: Decimal equivalent

Hex example: 2A to decimal and binary

Enter 2A. The left digit 2 sits in the 16¹ place: 2 × 16 = 32. The right digit A equals 10 in the 16⁰ place. Sum = 32 + 10 = 42 decimal.

Binary is 101010 and octal is 52. Two hex digits cover one byte (0–255), which is why CSS colours like #2A2A2A use six hex digits for red, green, and blue channels.

Each digit row shows its place power: 2×16¹ plus A×16⁰. Longer inputs such as DEAD extend the same rule leftward with 16³, 16², and so on until every nibble is accounted for.

Common uses

  • Convert HTML/CSS hex color codes to understand RGB values
  • Translate memory addresses in debugging
  • Convert MAC addresses and network values
  • Work with hexadecimal in assembly or low-level programming

Frequently asked questions

How do you convert hexadecimal to decimal?

Multiply each hex digit by 16 raised to its position power (from right, starting at 0), then sum the results. For example, hex 2A = 2×16¹ + 10×16⁰ = 32 + 10 = 42 in decimal.

What is hex FF in decimal?

FF = 15×16 + 15 = 255, the maximum value in one byte. Binary is 11111111. Web colour #FF0000 uses FF for the red channel and 00 for green and blue.

How do I convert hex 1A4B to decimal?

1×4096 + 10×256 + 4×16 + 11×1 = 4096 + 2560 + 64 + 11 = 6731. Enter 1A4B in the converter to verify binary and octal outputs match.

Why does the tool uppercase my hex input?

Uppercase A–F matches common datasheets and debugger displays. Values are case-insensitive, so ff and FF both mean 255 decimal. The math does not change with letter case; only readability improves in log files.

What colour is hex #00FF00 in decimal RGB?

00 = 0 red, FF = 255 green, 00 = 0 blue, so #00FF00 is pure green. Enter FF alone to see 255 decimal, the channel value used in many CSS palettes.

How do I convert hex C0 to decimal for an 8-bit colour channel?

C = 12 and 0 = 0, so C0 = 12×16 + 0 = 192 decimal. That is a mid-level grey-blue channel in many UI themes. Type C0 in the hex field to see binary 11000000.

Related calculators

Maintained by J Jaya Prakash · Last updated: October 2026