Developer · Converter

Decimal to hex converter.

Convert a decimal number to hexadecimal. 255 is FF, 65535 is FFFF and 2147483647 is 7FFFFFFF. Any length, exact.

Runs in your browserNothing is uploaded

Advertisement

Input

Result

Enter a value to convert it.

How to decimal to hex by hand

Divide the number by 16 repeatedly and keep the remainders: 6719 ÷ 16 = 419 remainder 15 (F), 419 ÷ 16 = 26 remainder 3, 26 ÷ 16 = 1 remainder 10 (A), 1 ÷ 16 = 0 remainder 1. Read the remainders from last to first: 1A3F.

The maths uses exact big integers, so very large numbers are not rounded. Commas, spaces and underscores are ignored. A leading minus sign is kept as a minus in front of the hex digits (sign-magnitude), not as two’s complement. Whole numbers only.

Worked examples

Decimal to hex converter examples
DecimalHex
255FF
40961000
67191A3F
65535FFFF
18446744073709551615FFFFFFFFFFFFFFFF

Need several formats side by side? Use the binary converter, which shows text, binary, hex and decimal together, or look a character up in the ASCII table. For Base64 text, see the Base64 encoder and decoder.

Sources: RFC 4648 section 8, Base 16 encoding. Retrieved October 2026.

Decimal to hex FAQ

How do I convert decimal to hex?

Divide by 16 repeatedly, write down each remainder (10 to 15 as A to F), and read the remainders from last to first. 255 ÷ 16 = 15 remainder 15, so 255 is FF.

What is 255 in hex?

FF.

What is 1000 in hex?

3E8: 3×256 + 14×16 + 8 = 1000.

How do I get negative numbers in hex?

This tool writes -255 as -FF. Fixed-width signed hex such as FFFFFF01 uses two’s complement, which needs a chosen bit width and is not done here.

Does it convert text to hex?

No, this converts numbers. To get the hex bytes of words use the text to hex converter.

Advertisement
Advertisement