Decimal to Hex Calculator

decimal to hex

Decimal to Hex Calculator

Enter a decimal (base 10) number to convert it to hexadecimal (base 16), binary (base 2), and octal (base 8).

Decimal base 10

Hex to Decimal Calculator

Enter a hexadecimal (base 16) value to convert it to decimal, binary, and octal. Letters A–F are accepted in upper or lowercase.

Hexadecimal base 16

Number Base Converter

Convert any number from one base to all other common bases at once — binary, octal, decimal, and hexadecimal.

Value

Decimal to Hex Reference Table

Decimal Hexadecimal Binary Octal

How to Convert Decimal to Hexadecimal

To convert a decimal (base 10) number to hexadecimal (base 16), repeatedly divide the number by 16 and record the remainder at each step. The remainders, read from bottom to top, form the hexadecimal result. Remainders of 10–15 are written as the letters A–F.

Example: Convert 255 to hex
255 ÷ 16 = 15 remainder 15 (F)
15 ÷ 16 = 0 remainder 15 (F)
Read remainders bottom to top: FF

Formula: Decimal → divide by 16 repeatedly → read remainders upward

How to Convert Hexadecimal to Decimal

To convert hex to decimal, multiply each digit by 16 raised to its positional power (starting from 0 on the right), then add all the results together. Hex letters A=10, B=11, C=12, D=13, E=14, F=15.

Example: Convert FF to decimal
F = 15, F = 15
(15 × 16¹) + (15 × 16⁰)
= (15 × 16) + (15 × 1)
= 240 + 15 = 255

Hexadecimal Digit Reference

The hexadecimal system uses 16 unique symbols. The digits 0–9 have the same value as in decimal, while the letters A–F represent values 10 through 15.

0=0   1=1   2=2   3=3   4=4   5=5   6=6   7=7
8=8   9=9   A=10   B=11   C=12   D=13   E=14   F=15

Why Hexadecimal Is Used in Computing

Hexadecimal is widely used in computing because it provides a compact representation of binary data. Each hex digit corresponds to exactly 4 binary bits (a nibble), so an 8-bit byte can always be written as exactly 2 hex digits. This makes hex values easy to read in memory addresses, color codes (e.g. #FF5733), and machine-level programming.

1 hex digit = 4 binary bits
2 hex digits = 1 byte (8 bits)
4 hex digits = 2 bytes (16 bits)
8 hex digits = 4 bytes (32 bits)

Practical Uses of Decimal to Hex Conversion

Decimal to hex conversion is essential in web design for HTML/CSS color codes, in networking for IP addresses and MAC addresses, in programming for memory addresses and bitwise operations, in electronics for register values and hardware configuration, and in cryptography and hashing algorithms where byte values are displayed in hex notation.