Decimal to Hex Converter

Type a decimal number to see it in hexadecimal and the other common bases, with the working shown step by step.

Hexadecimal
FF
Binary
1111 1111
Octal
377
Decimal
255
Other base (36)
73

Bits: 8

Working
positional expansion / repeated division / bit grouping
  1. 255 ÷ 16 = 15 … F
  2. 15 ÷ 16 = 0 … F
  3. 255₍10₎ = FF₍16₎

How to convert

  1. Repeated division: divide the decimal number by 16, note each remainder until the quotient is 0, then read the remainders bottom-up.
  2. Remainders 10–15 become A–F. Example: 255 ÷ 16 = 15 r 15 (F), 15 ÷ 16 = 0 r 15 (F), so 255 = FF.

Notes

  • Integers of any length are converted exactly — no scientific notation.
  • Prefixes are accepted: 0x for hex, 0b for binary, 0o for octal; spaces and underscores are ignored.
  • Negative numbers: prefix with "-". Fractions are not supported yet.

Decimal to Hex table

DecimalHexBinary
000
111
2210
3311
44100
55101
66110
77111
881000
991001
10A1010
11B1011
12C1100
13D1101
14E1110
15F1111
16101 0000
322010 0000
6440100 0000
10064110 0100
1277F111 1111
128801000 0000
255FF1111 1111
2561001 0000 0000
10003E811 1110 1000
1024400100 0000 0000
409610001 0000 0000 0000
65535FFFF1111 1111 1111 1111

Frequently Asked Questions

Related