Decimal to Hex Converter
Type a decimal number and get its hexadecimal form at once, plus binary and octal. Choose uppercase or lowercase letters.
How to convert decimal to hex
- 1Type the number in the Decimal box.
- 2Read the hex value.
- 3Copy it, or switch letters to lowercase if your code uses them.
Doing it by hand
Divide by 16 again and again, noting each remainder (10 to 15 are written A to F), until you reach 0. Read the remainders from last to first: 255 gives F and F, so 255 is FF.
Any size, any base
Numbers of any length convert exactly, with no rounding, and negative numbers work too. Binary, octal, decimal and hexadecimal each get a box, and another box takes any base from 2 to 36.
Bytes
Turn on “Group digits” to split hex into bytes, two digits each, as you'd see in memory dumps.
Frequently asked questions
- Is my data uploaded?
- No. The conversion runs in your browser and nothing is sent anywhere.
- What is 255 in hex?
- FF.
- What is 4096 in hex?
- 1000, since 4096 is 16 × 16 × 16.