Mojibake / Encoding Fixer

Fix garbled mojibake text like Café or don’t back to Café and don’t, right in your browser.

Your text is repaired locally in your browser and is never uploaded, but avoid pasting sensitive personal data into any online tool.

Built and maintained by Udit Agarwal

Need to escape HTML special characters? Try the HTML Entities tool.

About Mojibake / Encoding Fixer

This mojibake fixer repairs garbled text caused by an encoding mismatch — the kind that turns "Café" into "Café", "don't" into "don’t", and "😀" into "😀". The usual culprit is UTF-8 bytes that were wrongly decoded as Windows-1252 or Latin-1, so accented letters, smart quotes, dashes, and emoji come out as junk characters. The fixer reverses that: it maps each garbled character back to its original byte and re-decodes the result as UTF-8. Because more than one mismatch is possible, it offers several interpretations (UTF-8 ↔ Windows-1252, UTF-8 ↔ Latin-1, and a double-decode pass) and highlights the cleanest one, while letting you pick another. Paste text on the left and read the repair on the right. Everything runs in your browser, so the text you paste stays on your device.

Features

  • Repairs the most common mojibake: UTF-8 bytes decoded as Windows-1252 or Latin-1
  • Fixes accented letters, smart quotes, dashes, the euro sign, and broken emoji
  • Offers several candidate interpretations and flags the cleanest repair as Best
  • Includes a double-decode pass for text that was mis-decoded twice
  • Flags whether the input actually looks like mojibake before you trust a fix
  • Live input and output — paste on the left, read the repaired text on the right
  • Copy the fixed text with one click, or load a known-garbled sample to try it
  • Runs entirely in your browser; the text you paste is processed on your device

How to use the Mojibake / Encoding Fixer

  1. Paste the garbled text into the input box on the left.
  2. Read the best repair in the Fixed output panel on the right.
  3. Scan the Interpretations list and pick a different candidate if it reads cleaner.
  4. Click Copy to grab the repaired text.

Example

Input

Café — don’t panic

Output

Café — don’t panic

UTF-8 text wrongly decoded as Windows-1252, repaired back to clean characters.

Common errors & troubleshooting

  • The fix turns clean accented text into new junk like "Cé". — Your text was probably already correct UTF-8. Pick the Original candidate, or only run the fixer on input that actually looks garbled.
  • Some characters still look broken after one pass. — The text may have been mis-decoded twice. Choose the double-decode interpretation, which applies the repair a second time.
  • A few characters show as a black diamond question mark (�). — Those bytes were lost or replaced before you pasted them and cannot be recovered. Re-export the text from the original source as UTF-8.
  • Curly quotes and dashes are fixed but one odd symbol remains. — Try the Latin-1 interpretation instead of Windows-1252; the two differ only for a handful of punctuation and symbol bytes.

Frequently asked questions

What causes mojibake?
Mojibake happens when text saved in one character encoding is read in another. The classic case is UTF-8 bytes being decoded as Windows-1252 or Latin-1, so multi-byte characters like accents, smart quotes, and emoji split into several wrong single-byte glyphs.
Why does Café show as Café?
In UTF-8 the é is two bytes (0xC3 0xA9). When those bytes are read as Windows-1252, 0xC3 becomes à and 0xA9 becomes ©, so "Café" turns into "Café". The fixer maps those characters back to bytes and decodes them as UTF-8 to restore the é.
Why does an apostrophe turn into ’?
A curly apostrophe (’, U+2019) is three UTF-8 bytes. Decoded as Windows-1252 they become â, €, and ™, which is why "don't" appears as "don’t". Re-decoding those three characters as UTF-8 rebuilds the original ’.
What is the difference between the Windows-1252 and Latin-1 fixes?
Windows-1252 and Latin-1 (ISO-8859-1) are almost identical but differ in the 0x80–0x9F range, where Windows-1252 holds smart quotes, dashes, and the euro sign. Try the Windows-1252 fix first; switch to Latin-1 if a punctuation or symbol character is still wrong.
Can mojibake always be repaired?
Often, but not always. If the original bytes were replaced with a generic placeholder (the � replacement character) before you copied the text, the information is gone and no fixer can recover it. The repair only works while the garbled-but-reversible bytes are intact.
Is the text I paste uploaded anywhere?
No. The mojibake repair runs entirely in your browser, so the text you paste is processed locally on your device and is not sent to a server.

Related tools

Guides

More Encode / Decode tools

  • Protobuf Decoder — Decode a Protocol Buffers binary message (hex or base64) without a .proto schema.
  • Base32 Encoder / Decoder — Encode text to Base32 and decode Base32 back to text (RFC 4648), in your browser.
  • Morse Code Translator — Translate text to Morse code and Morse code back to text, with audio playback.
  • Text to Binary Converter — Convert text to binary, and binary, hex or decimal back to text, in your browser.
  • Base58 Encoder / Decoder — Encode and decode Base58 (Bitcoin / IPFS alphabet), with hex and text input.
  • ULID Generator — Generate sortable ULIDs and decode a ULID to its timestamp, in your browser.
  • Snowflake ID Generator — Generate and decode Twitter and Discord style Snowflake IDs, with timestamp extraction.
  • Caesar Cipher / ROT13 — Encode and decode Caesar, ROT13, ROT47 and Atbash ciphers, with a brute-force cracker.
  • Roman Numeral Converter — Convert numbers to Roman numerals and Roman numerals back to numbers, both ways.
  • Bitwise Calculator — Apply AND, OR, XOR, NOT and bit shifts to integers, with binary, hex and decimal views.
  • IEEE 754 Converter — Convert decimals to and from 32-bit and 64-bit IEEE 754 floating-point, with the bit fields.
  • Punycode Converter — Convert internationalized domain names between Unicode and ASCII Punycode (xn--), both ways.

See all Encode / Decode tools (31) · All tools