Home / Hex converter

Hex converter

Updated December 3, 2026

Type text to get its hex bytes, or paste hex to read it as text. Number mode converts whole numbers between decimal and hexadecimal.

Encoding, not encryption. These tools convert between ways of writing the same information. They are not secure encryption, so do not rely on them to protect anything private. Everything runs in your browser, and what you type is not sent anywhere.

How it works

Hexadecimal is base 16. It uses the digits 0 to 9 and the letters A to F for ten to fifteen. One hex digit stands for four bits and a byte is two hex digits, such as 2C. In text mode the tool encodes your text as UTF-8 and writes every byte as two hex digits. See text, binary and hex explained for the steps.

Example

“Hi” is the bytes 72 and 105 in decimal. In hex, 72 = 4 × 16 + 8 = 48 and 105 = 6 × 16 + 9 = 69, so the result is 48 69.

Reading hex back

Paste pairs of hex digits. Spaces, commas, colons, semicolons, hyphens, 0x prefixes and \x prefixes are ignored, and upper or lower case is fine. The digits must come in pairs, and the bytes must form valid UTF-8 text, or the tool reports the problem.

Number mode

Number mode converts a whole number as a whole. Decimal 255 is hex FF, since 15 × 16 + 15 = 255. It handles numbers of any size; fractions and negatives are not supported.

Questions

Why does hex use letters?

Base 16 needs sixteen digits and our usual ten digits run out at 9. The letters A to F stand for ten to fifteen.

What does 0x mean?

In C and many languages influenced by it, 0x in front of a number means the number is written in hexadecimal. The tool can add it before each byte.

Does letter case matter?

Not when reading: A to F and a to f mean the same. Use the option to choose which you want in the output.