Convert text to hex (UTF‑8)
Use this Text (UTF‑8) to Hex Converter when you need to represent text as hexadecimal bytes — the format most commonly used in:
- debugging and logs
- network protocols and payload docs
- file format inspection
- programming and test fixtures
- CTF / security challenges
The converter works in two steps:
- Your text is encoded into UTF‑8 bytes.
- Each byte is displayed as two hex digits (
00–ff).
That means this tool converts text → bytes → hex, not “letters → numbers” and not “base conversion for large integers”.
How to use it
- Paste or type your text into the input.
- Choose Encode (text → hex).
- Select Hex as the output format.
- Copy the result.
Output format
Hex output is shown as space‑separated byte pairs, usually lowercase:
48 65 6c 6c 6f
Each pair (48, 65, …) is one byte.
Examples
ASCII example
Text: "Hello"
Hex: 48 65 6c 6c 6f
Greek / non‑ASCII example (multi‑byte UTF‑8)
Many characters become multiple bytes in UTF‑8.
Text: "Ω"
Hex: ce a9
Emoji (often 4 bytes)
Text: "🙂"
Hex: f0 9f 99 82
This is why the output can look “long” for symbols and emoji: UTF‑8 encodes them as several bytes.
Common hex formats (and how to handle them)
Different tools expect different hex formatting. This converter outputs a clean, readable default (space‑separated byte pairs). If you need another style, you can usually transform it easily:
- No spaces:
48656c6c6f(remove spaces) - Uppercase:
48 65 6C 6C 6F - 0x prefix:
0x48 0x65 0x6c ... - Comma‑separated:
48,65,6c,6c,6f
If your destination is strict, convert here first, then apply the exact formatting it expects.
Troubleshooting
“Why does one character produce multiple bytes?”
UTF‑8 is a variable‑length encoding:
- ASCII characters (
A,b,1,!) → usually 1 byte - Greek / accented characters → often 2 bytes
- Many emoji → often 4 bytes
“I need ASCII hex only”
If you must output ASCII bytes only, make sure your input contains only ASCII characters. Non‑ASCII characters will always require multiple bytes in UTF‑8.
“My decoder rejects the hex”
Many decoders require exact byte pairs. Ensure:
- there are 2 hex characters per byte
- the total number of hex characters (without spaces) is even
- you’re not mixing in
0x, commas, or newlines unless your decoder supports them