About this tool
Hexadecimal packs four bits into a single digit, so it's the natural way to write bytes, color codes and memory values. Converting a decimal number to hex expresses it in base-16 using 0–9 and A–F: 255 becomes FF.
Type a decimal number and the hex updates as you type. Add the 0x prefix for code, switch between lower- and uppercase, and pad to a whole number of bytes (an even digit count) when you need a fixed-width value. Copy the formatted result with one click.
Conversion runs locally — nothing you enter is uploaded.
Frequently asked questions
Lowercase or uppercase hex — does it matter?
Not to the value: 0xff and 0xFF are identical. Uppercase is common in color codes and documentation; lowercase is common in code. Use the toggle to match your context.
What does byte padding do?
It pads the output to an even number of hex digits so each byte is two digits — 5 becomes 05. This keeps values aligned when you're working with byte sequences.
Can I convert hex back to decimal?
Yes — the hex to decimal converter reads values with or without the 0x prefix, in any case.