Skip to content
gohacks.dev
Tooling

Mojibake Fixer and UTF-8 Converter

Repair garbled text such as é and ’ back to é and ’, or convert a text file from Windows-1252, Latin-1, Shift_JIS, GBK or another encoding to UTF-8.

Free · No sign-up · Your inputs stay in your browser

Input

Fix mojibake and convert text files to UTF-8

Output

Repaired

0 characters

é appears when UTF-8 bytes are decoded as Windows-1252 or Latin-1: é is c3 a9 in UTF-8, and c3 a9 in Latin-1 reads é. Reversing that decoding gives the original back, and running it twice fixes text that went through the mistake twice. The cause is usually a database connection or an HTTP header without charset=utf8mb4 / UTF-8.

Runs in this browser. Nothing you paste is sent to a server.

How é becomes é

é is the bytes c3 a9 in UTF-8. Read as Windows-1252 or Latin-1, c3 is à and a9 is ©. The cause is almost always a missing charset somewhere: a database connection not set to utf8mb4, an HTTP response without charset=utf-8, or a CSV opened with the wrong encoding. The WHATWG Encoding standard defines the legacy encodings browsers support.

Fix the source too

Repairing text is a stopgap. Set the connection charset, declare UTF-8 in headers and meta tags, and store text as UTF-8 everywhere so it does not happen again.

Share

Frequently asked questions

Why does Excel show garbled characters in my CSV?
Excel opens CSV files in the system's legacy encoding unless the file starts with a UTF-8 BOM. Add a BOM, or import through Data, From Text and choose UTF-8.
Can every garbled text be repaired?
Only when the bytes survived. If a lossy conversion replaced characters with ? or the replacement character, the original is gone.
Is what I paste sent anywhere?
No. The tool runs entirely in your browser with JavaScript. Nothing you type or paste is sent to our server or stored.

Keep planning

Similar tools