UTF-8 Decode Online
ED-49Paste UTF-8 bytes and click UTF-8 decode to get the text. If your text already looks garbled, such as Café, click Fix garbled text to repair it.
Runs in your browser. Nothing is uploaded.
UTF-8 bytes, garbled text or text
Result
How to use it
- Choose how the bytes are written: hex, decimal, \xHH escapes or %HH percent bytes.
- Paste the bytes and click UTF-8 decode.
- For garbled text, paste it, pick Windows-1252 or Latin-1, and click Fix garbled text.
- To encode, paste text and click Text to UTF-8 bytes.
Decoding bytes
UTF-8 stores each character in one to four bytes. The tool reads your bytes in the notation you choose and decodes them. The bytes must be valid UTF-8. A missing, extra or overlong byte is reported with its position, and nothing is silently replaced by a placeholder character. That makes it easy to see where a damaged stream goes wrong.
Repairing garbled text
A common fault is UTF-8 text shown as one-byte characters, so é appears as é and the euro sign as €. Fix garbled text turns each character back into its byte, using Windows-1252 or Latin-1, and decodes those bytes as UTF-8. It works only when the garbling happened once and no characters were lost or changed since. Text that was garbled twice needs two passes.
Error messages and what to do
| Message | What it means | Fix |
|---|---|---|
is not a hex byte. | In hex mode, a token is not two hex digits. | Write each byte as two hex digits, like 48 65 6C, or change the byte format option. |
cannot come from UTF-8 bytes shown as | The garbled text has a character that one-byte text cannot hold. | Paste only the garbled part, or check you chose the right single-byte encoding. |
are not valid UTF-8. | Read back as bytes, the characters do not form valid UTF-8. | The text may not be garbled UTF-8, or it was edited after it was garbled. |
Questions people ask
How do I decode UTF-8 bytes?
Pick the byte notation, paste the bytes and click UTF-8 decode. For example, 48 C3 A9 6C 6C 6F in hex gives Héllo. Invalid sequences stop the tool with a message that names the byte, instead of being replaced silently.
Why does my text show é instead of é?
The UTF-8 bytes of é, C3 A9, were read as two single-byte characters, which is à and ©. This is often called mojibake. Paste the text and click Fix garbled text to turn the characters back into bytes and decode them properly.
Should I pick Windows-1252 or Latin-1?
Windows-1252 is the usual cause on the web, and it shows characters such as the euro sign and curly quotes in the range 128 to 159. Latin-1 maps those bytes to control codes. If one does not work, try the other.
Can the garbled text always be repaired?
No. It works only if the text was garbled once and nothing was lost. Characters replaced by question marks, or bytes dropped by an earlier step, cannot be recovered. The tool then reports that the bytes are not valid UTF-8.
How do I encode text to UTF-8 bytes?
Paste the text and click Text to UTF-8 bytes. The bytes are written in the notation you picked: hex, decimal, \xHH or %HH. An emoji gives four bytes, while a plain letter gives one.
About this tool
Decode reads the bytes in the notation you choose and turns them into text. They must be valid UTF-8: a missing, extra or overlong byte is reported with its position instead of being replaced by a placeholder. Fix garbled text handles the common case where UTF-8 text was shown as single-byte characters, so é appears as é. It turns each character back into its byte, using Windows-1252 or Latin-1, and decodes those bytes as UTF-8. It only works if the garbling happened once and no characters were lost along the way. Encode writes the UTF-8 bytes of your text. Nothing is uploaded.