Online Tool Store Online Tool Store
🔧 Data & CSV

· 4 min read

How to Fix Mojibake and Broken CSV Encoding

Heshan Fernando

Co-founder & COO

Heshan Fernando is the Co-founder and Chief Operating Officer of Ceyentra Technologies, where he leads project management, engineering, and research and development strategy. With over nine years of industry experience, he is passionate about transforming complex customer challenges into practical, high-impact solutions. His customer-centric leadership has enabled multidisciplinary teams to consistently deliver secure, scalable, and industry-grade digital products that create lasting business value. View on LinkedIn

Share

How to Fix Mojibake and Broken CSV Encoding

A CSV export from an older system, a file that’s passed through several tools with different default encodings, or a spreadsheet exported with the wrong character set all produce the same frustrating result: names, currency symbols, and accented characters that display as garbled sequences of random-looking characters instead of the text they’re supposed to represent. This is mojibake — text that was encoded correctly at the source but decoded using the wrong character encoding somewhere along the way, producing a scrambled but technically not-random result.

Fixing this means correctly identifying what encoding the file was actually saved in and re-decoding it properly, then saving the result as clean, consistent UTF-8 so the problem doesn’t just resurface the next time the file gets opened somewhere else.

What fixing mojibake in a CSV actually involves

Mojibake happens when text encoded in one character set gets interpreted using a different one during decoding — a file saved in a legacy encoding like Latin-1 or Windows-1252, then opened by software that assumes UTF-8, produces exactly this kind of garbled output for any character outside the basic ASCII range. Fixing it means correctly identifying the original encoding the file was actually saved in, re-decoding the raw bytes using that correct encoding to recover the intended characters, and then saving the result in UTF-8 — the encoding that correctly and consistently represents the widest range of characters and is what most modern tools expect by default. Getting the original encoding identification right is the trickiest part, since garbled text alone doesn’t announce which specific encoding mismatch produced it, and guessing wrong just produces a different flavor of garbled output rather than a fix.

This matters for any CSV meant to be shared, imported into another system, or opened reliably across different tools and platforms — a file left in mojibake, or one saved back in an inconsistent encoding, will keep causing the same display problem wherever it goes next.

Why people get stuck here

  • Garbled text doesn’t announce which encoding mismatch caused it. Mojibake looks like scrambled characters regardless of the specific encoding mismatch behind it, making the correct fix non-obvious just from looking at the broken output.
  • Guessing the wrong original encoding just produces different garbled text. Attempting a fix without correctly identifying the source encoding doesn’t resolve the problem — it just changes what the garbled output looks like.
  • Files that pass through multiple tools accumulate encoding inconsistency. A CSV edited or exported by several different programs with different default encodings can end up in a genuinely confusing state.
  • Saving the fix back in an inconsistent encoding doesn’t actually resolve the underlying problem. A file re-decoded correctly but saved in something other than a consistent, widely supported encoding like UTF-8 risks the same issue resurfacing later.

What a good CSV encoding fixer looks like

Correctly identifies the source encoding

Accurately determining what encoding the file was actually saved in is the essential first step that a wrong guess would undermine entirely.

Re-decodes the content properly

Recovering the actual intended characters from the raw bytes, using the correctly identified encoding, is what turns garbled mojibake back into readable text.

Saves the result as clean, consistent UTF-8

Standardizing on UTF-8 for the output avoids the same encoding mismatch problem resurfacing the next time the file is opened somewhere else.

Common mistakes to avoid

  • Attempting to fix mojibake without correctly identifying the file’s actual original encoding first.
  • Assuming a garbled CSV is unfixable rather than a solvable encoding mismatch.
  • Saving a re-decoded file back in an inconsistent or unusual encoding instead of standard UTF-8.
  • Not checking whether a file has passed through multiple tools that may have each applied a different encoding assumption.

How to do it with CSV Encoding Fixer

Online Tool Store’s CSV Encoding Fixer takes a CSV with garbled characters and re-decodes it correctly, saved as clean UTF-8, entirely in your browser.

  1. Upload your CSV with garbled or mojibake text.
  2. Let it identify and correctly re-decode the original encoding.
  3. Review the fixed, readable text.
  4. Download the result, saved as clean UTF-8.

Because it correctly identifies the source encoding and standardizes the output on UTF-8, the fixed file displays properly and stays fixed wherever it’s opened next.

Frequently asked questions

What actually causes mojibake in a CSV file?

It happens when text encoded in one character set — like Latin-1 or Windows-1252 — gets decoded using a different encoding, typically UTF-8, producing garbled characters for anything outside the basic ASCII range.

Why can’t I just guess at fixing garbled text manually?

Garbled output alone doesn’t reveal which specific encoding mismatch caused it, so guessing the wrong original encoding just produces a different garbled result rather than an actual fix.

Why does saving the result as UTF-8 matter?

UTF-8 is the encoding most modern tools and systems expect by default, so saving the fixed file in that consistent format prevents the same mismatch problem from resurfacing the next time the file is opened elsewhere.

Final thought

Mojibake is a solvable encoding mismatch, not unfixable corruption — the fix just requires correctly identifying the original encoding and re-decoding properly. Fix it once, save it as clean UTF-8, and stop the problem from coming back.

Try the free CSV Encoding Fixer

#csv encoding fixer#fix mojibake csv#csv utf-8 converter#repair csv encoding#online-tools#free-tools