Decimal to Hex Converter

You have a decimal number — a byte value, an offset, an RGB channel — and the system you are feeding wants hex. Color codes like #FF8000, CSS rgb() to hex conversions, protocol fields and memory offsets all speak hexadecimal because one hex digit is exactly four bits, so a byte is always two clean digits.

The From base is pre-set to 10, so type the decimal value and read the hex off the HEX row in uppercase, ready to paste into a color picker or a struct definition. Negative inputs keep their minus sign (sign-magnitude, no two's complement), and values beyond 2^53 stay exact — no float rounding.

FAQ

Is the hex output uppercase or lowercase?

Uppercase (A-F), because that is the more common convention in color codes and byte dumps. Both spellings mean the same number.

How do I convert decimal to hex by hand?

Divide by 16 repeatedly and read the remainders bottom to top, mapping 10-15 to A-F. 255 gives remainders 15, 15 — so FF. Or use the converter above and skip the long division.

Can I convert a decimal color channel to a hex color?

Yes — convert each of the red, green and blue channels (0-255) separately and concatenate the three two-digit results. 255, 128, 0 becomes FF8000.

Read the full Number Base Converter guide and the Number Base Converter API reference.