What is Hexadecimal?

Hexadecimal is a base-16 number system that uses sixteen symbols: 0–9 and A–F. Because one hex digit maps neatly to four binary bits, it is a compact way to represent binary data — used for memory addresses, color codes (#FF8800), and byte values.

Two hex digits represent one byte (0–255). Hex is often prefixed with 0x in code, e.g. 0x1F equals 31 in decimal.

Key points

  • Base-16, using digits 0–9 and letters A–F.
  • One hex digit maps to exactly four binary bits.
  • Two hex digits represent one byte (0–255).
  • Often prefixed with 0x in code.

Example

0xFF = 255
#FF8800 is an RGB color

Common uses

  • CSS and design color codes (#RRGGBB)
  • Memory addresses and byte values
  • Representing hashes and binary data compactly
  • Bitwise and low-level programming

Work with Hexadecimal directly in your browser.

Open the Number Converter

More terms