Decimal to Hex

Convert any base 10 number to hexadecimal instantly. Type a value and watch the conversion happen in real time with an interactive visual breakdown.

⚡ Quick Convert

Invalid characters for the selected base

Conversion Result
0x0

⚙️ Live Conversion Diagram

Type a decimal number to see the division steps

🕑 Recent Conversions

Your conversions will appear here

What Is Decimal to Hexadecimal

Converting decimal to hexadecimal means changing a number from the base 10 numeral system to the base 16 numeral system. The decimal number system uses ten digits (0–9). The hexadecimal number system adds six more symbols — the hex digits A–F — to represent values 10 through 15.

Programmers and engineers prefer hexadecimal because it maps cleanly to binary numbers. Each hex digit represents exactly four binary bits. A single byte (8 bits) fits in just two hex digits. Memory addresses, color codes, and machine instructions become much easier to read than raw binary.

🔄 Base Comparison — See One Number in Every Base

Decimal Number System

The decimal number system is the base 10 numeral system you use every day. Each digit position represents a power of 10. The rightmost digit is the ones place (10⁰), the next is tens (10¹), then hundreds (10²), and so on. The radix — the base of the number system — is 10.

📊 Decimal Place Values — Interactive Breakdown

Hexadecimal Number System

The hexadecimal number system is a base 16 numeral system. It uses sixteen symbols: digits 0–9 plus the hex digits A–F, where A = 10, B = 11, C = 12, D = 13, E = 14, and F = 15. Each position represents a power of 16.

🔢 Hex Digit Explorer — Click Any Digit

Click a hex digit above to see its details

How to Convert Decimal to Hexadecimal

The standard method is the repeated division and remainder algorithm. Take the integer, divide it by 16, and record the remainder. That remainder maps to a hex digit. Then take the quotient and repeat until it reaches zero. Read the remainders from bottom to top — that's your hexadecimal result.

For example, converting the integer 255: divide 255 by 16 to get quotient 15 and remainder 15. Since 15 maps to F, the hex result is FF. Two divisions, two hex digits.

⚡ Try It — Interactive Division Diagram

Decimal to Hexadecimal Formula

The decimal to hexadecimal formula uses repeated division by the radix (16). At each step, the remainder becomes one hex digit, and the quotient carries forward to the next step.

N ÷ 16 = Q remainder R
N = decimal integer · Q = quotient · R = remainder (0–15)
1Divide N by 16. Record quotient Q and remainder R.
2Map R to its hex digit (0–9 stay, 10→A, 11→B, … 15→F).
3Replace N with Q. Repeat until Q = 0.
4Read hex digits in reverse order — that's the result.

Step-by-Step Conversion Method

Use the visualizer below to watch the repeated division and remainder algorithm in action. Enter any decimal integer, then play or step through each division.

Enter a decimal number above and click "Visualize"
to see the conversion animated step by step.

Final Hexadecimal Result

All Conversion Tools

Instantly convert between number systems, encodings, and formats with interactive step-by-step breakdowns.

Dec → Hex

Decimal to Hexadecimal

Base 10 → Base 16

Try Now →
Hex → Dec

Hexadecimal to Decimal

Base 16 → Base 10

Try Now →
Dec → Bin

Decimal to Binary

Base 10 → Base 2

Try Now →
Bin → Dec

Binary to Decimal

Base 2 → Base 10

Try Now →
Dec → Oct

Decimal to Octal

Base 10 → Base 8

Try Now →
Oct → Dec

Octal to Decimal

Base 8 → Base 10

Try Now →
Oct → Hex

Octal to Hexadecimal

Base 8 → Base 16

Try Now →
Hex → Oct

Hexadecimal to Octal

Base 16 → Base 8

Try Now →
Oct → Bin

Octal to Binary

Base 8 → Base 2

Try Now →
Bin → Oct

Binary to Octal

Base 2 → Base 8

Try Now →
Hex → Bin

Hexadecimal to Binary

Base 16 → Base 2

Try Now →
Bin → Hex

Binary to Hexadecimal

Base 2 → Base 16

Try Now →
Dec → BCD

Decimal to BCD

Convert decimal numbers to Binary Coded Decimal (B...

Try Now →
Dec → 2's

Decimal to 2's Complement

Convert decimal integers (including negatives) to ...

Try Now →
Bin → ASCII

Binary to ASCII

Convert binary numbers to ASCII text characters. D...

Try Now →
Bin → Gray

Binary to Gray Code

Convert standard binary to Gray code (reflected bi...

Try Now →
Hex → ASCII

Hex to ASCII

Convert hexadecimal values to ASCII text. Decode h...

Try Now →
Hex → RGB

Hex to RGB

Convert hex color codes to RGB values instantly. S...

Try Now →
RGB → Hex

RGB to Hex

Convert RGB color values to hexadecimal color code...

Try Now →
ASCII → Hex

ASCII to Hex

Convert ASCII text to hexadecimal representation. ...

Try Now →
Hex → Text

Hex to Text

Convert hexadecimal strings to readable text. Deco...

Try Now →
Dec → Frac

Decimal to Fraction

Convert decimal numbers to simplified fractions. S...

Try Now →
Dec → %

Decimal to Percent

Convert decimal values to percentages instantly wi...

Try Now →
Any → Any

Number Base Converter

Convert numbers between any bases (2-36). Universa...

Try Now →
Hex → Info

Hexadecimal Reference

Complete hexadecimal reference with conversion tab...

Try Now →
Hex → Unicode

Hex to Unicode

Convert hexadecimal code points to Unicode charact...

Try Now →
ASCII → Bin

ASCII to Binary

Convert ASCII text to binary representation. See e...

Try Now →

Frequently Asked Questions

Decimal to hexadecimal conversion is the process of changing a number from base 10 (which uses digits 0–9) to base 16 (which uses digits 0–9 and letters A–F). Each hex digit represents exactly 4 binary bits, making hex a compact way to represent binary data.
Divide the decimal number by 16 repeatedly. At each step, record the remainder — that becomes a hex digit (0–9 or A–F). Continue dividing the quotient by 16 until it reaches zero. Then read the remainders from bottom to top to get your hex result.
Hexadecimal (hex) is a base-16 numeral system. It uses sixteen symbols: digits 0–9 represent values zero through nine, and letters A–F represent values ten through fifteen. It is widely used in computing, web design, and digital electronics.
Hexadecimal maps perfectly to binary — each hex digit equals exactly 4 bits. This makes it much easier for programmers to read and write binary data. Memory addresses, color codes, MAC addresses, and error codes are all commonly expressed in hex.
Common examples include: 10 = A, 15 = F, 16 = 10, 100 = 64, 255 = FF, 256 = 100, 1000 = 3E8, 4095 = FFF, 65535 = FFFF. The number 255 (FF in hex) is especially important as it represents the maximum value of a single byte.
Start with your decimal number. Divide by 16 to get a quotient and remainder. The remainder (0–15) maps to a hex digit. Replace the number with the quotient and repeat. When the quotient reaches 0, read all the remainders in reverse order — that is your hexadecimal number.
Binary (base 2) uses only 0 and 1, while hexadecimal (base 16) uses 0–9 and A–F. Hex is a shorthand for binary: each hex digit represents exactly 4 binary digits. For example, binary 11111111 = hex FF. Hex is more human-readable for large binary values.
Yes, but negative numbers in computers typically use two's complement binary representation. For example, -1 in 8-bit two's complement is 11111111 in binary, which equals FF in hex. Our specialized two's complement converter handles this.
The 0x prefix is a common convention in programming languages (C, Java, Python, JavaScript) to indicate that a number is hexadecimal. For example, 0xFF means the hex value FF (255 in decimal). It prevents confusion with decimal numbers.
Hex color codes use six hex digits in the format #RRGGBB, where RR is red, GG is green, and BB is blue. Each pair ranges from 00 (0) to FF (255). For example, #FF0000 is pure red, #00FF00 is green, #0000FF is blue, and #FFFFFF is white.
The largest single hex digit is F, which represents decimal 15 (or binary 1111). After F, you need two hex digits: 10 in hex equals 16 in decimal.
Multiply each hex digit by 16 raised to the power of its position (counting from 0 on the right), then sum all the results. For example, hex 1A3 = (1×16²) + (A×16¹) + (3×16⁰) = 256 + 160 + 3 = 419.
Hex is more compact and readable than binary. A single byte (8 bits) requires 8 binary digits but only 2 hex digits. For instance, binary 10110110 is simply B6 in hex. This makes debugging, memory inspection, and data analysis much faster.
A nibble (or nybble) is a group of 4 binary bits — exactly half a byte. Each nibble corresponds to one hexadecimal digit. The term comes from being a 'small bite' of data. A byte consists of two nibbles, represented by two hex digits.
Yes! Our converter is completely free with no registration required. You can convert unlimited numbers between decimal, hexadecimal, binary, and octal. The tool also provides step-by-step visual breakdowns of every conversion.