Convert text to hexadecimal – two hex digits per UTF-8 byte, or per code point. Hex is the standard way to display bytes in debuggers, hex editors and protocol dumps.
Show calculation steps
Processed privately in your browser — nothing you paste is uploaded, logged or stored.
Bytes in base 16
Hexadecimal is the standard way to write bytes because one byte is exactly two hex digits, always. That fixed width is what makes a hex dump scannable: every character position means the same thing on every line, so a missing or extra byte is visible rather than inferred.
Worked example
"Hi" → 48 69 "é" → c3 a9 (UTF-8, two bytes) "€" → e2 82 ac (UTF-8, three bytes)
Per byte or per code point
The two options answer different questions. Per byte shows what is stored and what travels — the thing a protocol or a file format cares about. Per code point shows the Unicode number of each character, which is what you want when checking that the right character was chosen rather than how it was packed.
Where hex bytes turn up
Wire captures, file signatures, hash values, colour definitions, and any debugging session where two systems disagree about a string. Converting to hex is usually the quickest way to find out whether the problem is the characters or the encoding.
Limits
Output is UTF-8 unless you choose otherwise. Hex is a display format, not compression or protection: it doubles the size and anyone can read it back. Conversion happens in your browser.
How to use the Text to Hex
- Paste your text.
- Choose bytes or code points, a separator and whether to zero-pad each value.
- Click "Convert to hex".
Frequently asked questions
Why is hex the standard way to show bytes?
Because one byte maps exactly onto two hex digits, so the notation is compact, unambiguous and aligns neatly in columns. Binary is four times longer and decimal does not align to byte boundaries.
What is the difference between byte mode and code point mode here?
Byte mode shows the actual UTF-8 encoding – the letter e-acute appears as the two bytes C3 A9. Code point mode shows the character identity, U+00E9, as the single value E9. Both are correct answers to different questions.
Can I get output with 0x prefixes for source code?
Set the separator to comma and add the prefixes in your editor, or paste the result into the Text to Binary tool family as needed. The Hex to Text converter accepts 0x prefixes on input regardless.