Hex ↔ Decimal Converter

Convert between hexadecimal, decimal, binary, and octal. All four update simultaneously as you type.

Hexadecimal (Base 16)
Decimal (Base 10)
Binary (Base 2)
Octal (Base 8)
Batch Converter

Paste multiple numbers (one per line), select the input base, and convert all at once.

Common Hex Reference
HEXDECBINOCTNotes
000000000000Zero / null
0F150000111117Lower nibble
10160001000020
1F310001111137
20320010000040Space (ASCII)
406401000000100@ (ASCII)
7F12701111111177DEL (ASCII)
8012810000000200Sign bit (8-bit signed)
A016010100000240
C019211000000300Common subnet mask byte
FF25511111111377Max byte / 8-bit unsigned
100256100000000400
FFFF655351111111111111111177777Max 16-bit unsigned

How to use

  • Type in any of the four fields (HEX, Decimal, Binary, Octal) — all others update instantly
  • If the hex value looks like a CSS color (#RRGGBB or RRGGBB), a color swatch preview appears
  • Use the Batch Converter to convert many numbers at once — paste one per line, select the base, and click Convert All
  • The reference table shows common hex values and their equivalents in all bases
  • Hex input is case-insensitive (A = a)

About this Hex to Decimal Converter

Hexadecimal (base 16) uses sixteen digits — 0 through 9, then A through F for values 10 through 15 — instead of the ten digits used in decimal (base 10). It's the standard way to represent color codes, memory addresses, and byte values because it maps cleanly onto binary.

Why hex maps neatly to binary

One hex digit represents exactly 4 binary bits (since 16 = 2⁴), so a full byte (8 bits) converts to exactly 2 hex digits. This clean relationship is why programmers use hex as a compact, human-readable shorthand for binary data instead of writing out long strings of 1s and 0s.

Worked example

Converting hex FF to decimal: F represents 15, and in the two-digit place, the value is (15 × 16) + 15 = 240 + 15 = 255. This is why FF appears constantly in web colors and byte values — it's the maximum value a single byte (8 bits) can hold.

Where hex shows up

  • CSS colors: #FF0000 is pure red, where each pair of hex digits represents red, green, and blue channel values from 0–255
  • Memory addresses and pointers in low-level programming and debugging
  • MAC addresses and some network identifiers
  • Character encoding references, like Unicode code points