Decimal to Hex Converter

๐Ÿ”’ Runs in your browser โ€” nothing is sent to a server

Convert a decimal integer to hexadecimal. The number is divided by 16 repeatedly and the remainders form the hex digits, so 255 becomes ff and 4096 becomes 1000. Choose lowercase (ff) or uppercase (FF) output โ€” both forms are equivalent but stylistic conventions differ between languages and tools. Indispensable for picking RGB colors, packing byte values, generating memory offsets and writing hex literals in C, Java or assembly.

Decimal (10)

Allowed: 0โ€“9

Hexadecimal (16)

Allowed: 0โ€“9, aโ€“f

Decimal (10) โ†’ Hexadecimal (16)

Quick reference table

Decimal (10)Hexadecimal (16)
10a
1610
3220
10064
255ff
256100
40961000
65535ffff
6553610000
1048576100000

Glossary

Decimal (base 10)

The decimal numeral system is the everyday number system used by humans, with digits 0 through 9. Each digit position represents a power of 10 โ€” units, tens, hundreds, thousands. It is sometimes called base-10 or denary. All four bases on this page convert through decimal as a canonical integer value, so a round-trip such as binary โ†’ decimal โ†’ hex always produces the exact same number.

Hexadecimal (base 16)

The hexadecimal numeral system uses sixteen digits: 0โ€“9 and aโ€“f, where aโ€“f represent 10โ€“15. Each hex digit maps to exactly four binary digits (one nibble), which makes hex the compact human-readable form of binary data. Memory addresses, MAC addresses, MD5/SHA hashes, RGB color codes such as #ff8800 and machine-code bytes are all conventionally written in hex.

Related tools