Decimal to Hexadecimal Converter

Convert decimal numbers to hexadecimal format using repeated division method. Essential for programming and web development.

Enter a positive integer (0 to 4,294,967,295)

How to Convert Decimal to Hexadecimal

1

Start with the decimal number you want to convert

2

Divide the number by 16 and record the quotient and remainder

3

Convert the remainder to its hexadecimal equivalent (0-9, A-F)

4

Continue dividing the quotient by 16 until you get 0

5

The hexadecimal equivalent is the remainders read in reverse order

Example: Convert 65029₁₀ to Hexadecimal

65029 ÷ 16 = 4064 remainder 5 → 5

4064 ÷ 16 = 254 remainder 0 → 0

254 ÷ 16 = 15 remainder 14 → E

15 ÷ 16 = 0 remainder 15 → F

Reading remainders from bottom to top: FE05₁₆

Quick Decimal to Hex Reference

0-9
Same in hex
10
A
11
B
12
C
13
D
14
E
15
F

Programming Applications

Python
hex(255)  # Returns '0xff'
format(255, 'X')  # Returns 'FF'
JavaScript
255.toString(16)  // Returns 'ff'
255.toString(16).toUpperCase()  // Returns 'FF'
Java
Integer.toHexString(255)  // Returns "ff"
String.format("%X", 255)  // Returns "FF"

🛠️ Free Smart Tools

English English