Free forever · No sign-up

Decimal to Hex Converter

Convert any decimal number to hexadecimal instantly — see every division step. Free, fast, no sign-up.

Last updated: October 2026

Your data stays in your browser.

Recent

No recent conversions yet.

How to convert decimal to hex

  1. Divide the decimal number by 16 and write down the remainder in hex.
  2. Divide the quotient by 16 and write down the new remainder.
  3. Repeat until the quotient is 0, then read the remainders from bottom to top.

Example: 419 → 419÷16=26 r3, 26÷16=1 r10 (A), 1÷16=0 r1 → 1A3.

Background reading: the hexadecimal system on Wikipedia.

Conversion table

Decimal 0–15 with the matching hex digit, plus larger worked examples.

DecimalHexCalculation
000 = 0
111 = 1
222 = 2
333 = 3
444 = 4
555 = 5
666 = 6
777 = 7
888 = 8
999 = 9
10A10 = A
11B11 = B
12C12 = C
13D13 = D
14E14 = E
15F15 = F
161016 ÷ 16 = 1 r 0 → 10
255FF255 ÷ 16 = 15 r 15 → FF
409610004096 = 16³ → 1000

Powers of 16

PowerValue
1601
16116
162256
1634096
16465536

Decimal to hex in code

Python

hex(255)[2:]       # → 'ff'

JavaScript

(255).toString(16);  // → 'ff'

C

#include <stdio.h>

int main(void) {
    printf("%X\n", 255);  /* → FF */
    return 0;
}

Real-world applications

Common mistakes

Common values

  • 255 = FF₁₆
  • 16 = 10₁₆
  • 10 = A₁₆
  • 256 = 100₁₆
  • 0 = 0₁₆
  • 4,095 = FFF₁₆

Key takeaways

  • Divide by 16 repeatedly; read remainders bottom-to-top, writing 10–15 as A–F.
  • 255 = FF₁₆, 16 = 10₁₆, 4096 = 1000₁₆.
  • Each hex digit replaces exactly four binary bits.
  • Pad to an even number of digits when working with whole bytes.

Frequently asked questions

How do I convert decimal to hex?

Repeatedly divide by 16, record each remainder in hex, and read the remainders bottom-to-top. The converter above shows every step.

What is 255 in hex?

255 in decimal equals FF in hex.

What do the letters A-F mean in hex?

They stand for the values 10 to 15: A=10, B=11, C=12, D=13, E=14, F=15.

What is 1000 in hex?

1000 in decimal equals 3E8 in hexadecimal.

How do you convert decimal to hex without a calculator?

Divide by 16 repeatedly, convert each remainder to a hex digit (10=A … 15=F), and read the digits bottom-to-top.

How do I convert 255 to hex?

Divide by 16: 255 ÷ 16 = 15 remainder 15 → F, F → FF. So 255 = FF₁₆.

Why do programmers use hex?

Hex is compact: one byte is always exactly two hex digits, and each hex digit maps to exactly four binary bits.

What is 16 in hex?

16 = 10₁₆.

Need the reverse? Try our hex to decimal converter.

More converters

Add this converter to your website

Embed our free binary to decimal converter on your own site with one line of code:

<script src="https://binary-to-decimal-28z.pages.dev/embed.js"></script>