Convert text to UTF-8 hex bytes, with spaces, commas or nothing between, lower or upper case
Paste text to get its UTF-8 bytes in hex, two digits a byte, the way a hex editor, a debugger or a protocol spec shows them.
How to use it
Paste text, or open a text file. Pick Hex (ff), Hex (FF), Hex (0xff) or Hex (\xff), and a space, a comma or nothing between bytes. Copy or download the hex. Bytes → Text reads hex back.
Examples
A word
Input
Hello
Result
48 65 6c 6c 6f
Capitals, nothing between
Input
Hello
Result
48656C6C6F
Write as: Hex (FF), Between bytes: None.
A C or Python string escape
Input
Hi
Result
\x48\x69
Write as: Hex (\xff), Between bytes: None.
A symbol is three bytes
Input
€5
Result
e2 82 ac 35
Hex is a byte in two digits
Why one character can be several bytes
| Character | Bytes in hex | Bytes |
|---|---|---|
A | 41 | 1: ASCII letters, digits, punctuation |
é | c3 a9 | 2: accented Latin, Greek, Cyrillic, Hebrew, Arabic |
€ | e2 82 ac | 3: most other scripts (Chinese, Hindi) and symbols |
😀 | f0 9f 98 80 | 4: most emoji |
Questions
- How much text can it convert?
Up to 2 MB of text at once; written as bytes it comes out several times longer. - Is this the same as a Unicode code point?
Only for ASCII. The page shows the UTF-8 bytes: € is the code point U+20AC but the three bytes e2 82 ac. Code points are what \u20ac in JSON and € in HTML write. - How do I write the hex in code?
Pick Hex (0xff) with Comma between bytes for an array in C, Java or JavaScript: 0x48, 0x69. Pick Hex (\xff) with None for a C or Python string: \x48\x69. Hex to Text reads 0x48, \x48 and %48 back as they are. - Is the text I convert uploaded?
No. Everything runs in your browser, so your text stays on your device. Nothing you paste is uploaded unless you share a result, which is locked with your password first.