InovoTools
Developer Tools

Decimal to Hex Converter

Convert a decimal number to hexadecimal, with binary and octal shown as well. Useful for colour codes, memory addresses, Unicode code points and any value a program prints in hex.

01

Your inputs

Start with the example, or enter your own values.

Processed in your browser. Your inputs stay on this device.

02

Your result

A little clarity, coming right up.

Make room for the answer.

Enter your values and run the tool. Your result will appear here.

How to use the Decimal to Hex Converter

Type a whole number in decimal. You get the hex value, plus binary and octal.

How decimal to hex conversion works

Divide the number by 16 and note the remainder, then divide the quotient by 16 again until it reaches 0. Remainders from 10 to 15 are written A to F. Read the remainders from last to first. For 500: 500 ÷ 16 = 31 remainder 4, 31 ÷ 16 = 1 remainder 15 (F), and 1 ÷ 16 = 0 remainder 1, so 500 is 1F4.

Hex and colour codes

Web colours use one hex pair for each of red, green and blue. A channel value of 255 is FF, 128 is 80 and 0 is 00, so rgb(255, 128, 0) is written #FF8000.

How it works

Divide repeatedly by 16 and read the remainders upward.

Examples

  • 500
    Hex: 1F4
    Binary: 1 1111 0100
    Octal: 764
  • 255
    Hex: FF
    Binary: 1111 1111
    Octal: 377
  • 4096
    Hex: 1000
    Binary: 1 0000 0000 0000
    Octal: 10000

Decimal to hex table

DecimalHex
10A
11B
12C
13D
14E
15F
1610
3220
6440
10064
1277F
12880
255FF
256100
5001F4
10003E8
40961000
65535FFFF

Limitations and assumptions

Runs entirely in your browser. Nothing you enter is uploaded.

Frequently asked questions

What is 255 in hex?

FF, the largest two-digit hex value and the maximum of one byte.

What is 16 in hex?

10. In base 16 the digit after F rolls over to the next place, just as 9 rolls over to 10 in decimal.

What do the letters A to F mean?

They are single digits for the values 10 to 15, because base 16 needs sixteen symbols and decimal only has ten.

How do I convert hex back to decimal?

Use the hex to decimal converter, or multiply each digit by its power of 16 and add the results.