About this tool
UTF-8 is how almost all text on the web and in files is stored: each character becomes one to four bytes. This tool shows that process in both directions. It converts text into its UTF-8 bytes in the format you need, decodes bytes (hex, \x escapes, %XX, decimal or binary) back to text, and lists the bytes of every character so you can see exactly what is stored.
How UTF-8 works
| Code points | Bytes | Bit pattern | Example |
|---|---|---|---|
| U+0000 – U+007F | 1 | 0xxxxxxx | A = 41 |
| U+0080 – U+07FF | 2 | 110xxxxx 10xxxxxx | é = C3 A9 |
| U+0800 – U+FFFF | 3 | 1110xxxx 10xxxxxx 10xxxxxx | € = E2 82 AC |
| U+10000 – U+10FFFF | 4 | 11110xxx 10xxxxxx ×3 | 👋 = F0 9F 91 8B |
The first 128 characters are identical to ASCII, which is why plain English text is the same in both.
Fix garbled text (mojibake)
Text like café, ’ or über is UTF-8 that was read as Windows-1252 or Latin-1, a classic database, CSV or email problem. Choose Fix garbled text and the tool reverses the mistake (café → café), even when it happened twice. The real fix is to declare UTF-8 where the text was saved or read: the database connection charset, the CSV import setting, or the Content-Type header.
Decoding errors
If bytes are not valid UTF-8 (for example a lone C3, or Latin-1 bytes like E9 for é), you get a clear error rather than replacement characters (�). Such data is either binary or in a different encoding.
FAQ
How do I convert text to UTF-8 bytes?
Type or paste the text. Its UTF-8 bytes appear in hex by default; choose \x escapes, %XX, decimal, binary or an array instead.
How do I decode UTF-8 hex to text?
Switch to “Bytes → text” and paste the bytes, for example 63 61 66 C3 A9. Spaces are optional, and \x and % prefixes are accepted.
Why does my text show é instead of é?
UTF-8 bytes were read as Windows-1252 or Latin-1. Use “Fix garbled text” to repair it, and set UTF-8 where the text is saved and read.
How many bytes is a character in UTF-8?
One byte for ASCII (English letters, digits), two for most accented Latin, Greek, Cyrillic, Hebrew and Arabic letters, three for most other scripts and symbols like €, and four for emoji and rare characters.
What is the difference between UTF-8 and Unicode?
Unicode numbers every character; UTF-8 is a way to store those numbers as bytes. UTF-16 and UTF-32 are other ways.