Garbled characters in a CSV: repair the encoding
An export shows “Crème brûlée” or “Cr?me br?l?e”: drop the file, the tool guesses the encoding, repairs the text and returns a clean file.
Result
The full file
The repaired CSV file, in full
- Every row, with accented letters corrected
- UTF-8 with a byte order mark, separator and decimal mark of your choice
- A file ready to open in Excel or LibreOffice
$4.99 one payment, no subscription
Your order
The repaired CSV file, in full
- Contents
- Full repaired CSV file
- Total
- $4.99
Payment is not open yet: your detailed result is free
You have paid nothing: no bank details were asked for or sent.
This site is a trial. The price of $4.99 was a price under consideration, to find out whether this detail is useful to people who try it. We should have told you before your click, and we apologize. Thank you: your click helps us decide what is worth keeping.
In the print window that opens, choose “Save as PDF” as the printer.
Why accented letters break
A text file does not say how its characters are encoded. A cash register saves in Windows-1252, an export page in UTF-8, an old Mac in Mac OS Roman. If the program that reads it guesses wrong, “é” becomes “é”. Worse, if that badly read text is saved again, the letters are damaged in the file itself: reading it as UTF-8 is no longer enough. The tool handles both cases: it chooses the encoding to read with, then detects and undoes text that was misread.
What the tool does, in order
- It looks for a byte order mark (UTF-8 or UTF-16), otherwise it tries strict UTF-8; a file that is not valid UTF-8 is read as Windows-1252, Mac OS Roman or ISO-8859-15, whichever gives the most plausible letters. You can force the encoding if the preview stays wrong.
- It spots the typical sequences of text that is already damaged (“é”, “’”, “” before a space) and repairs them, up to three times for a file damaged several times. Sound text that legitimately contains an “Ô is left alone.
- It reads the table (separator detected: semicolon, comma, tab or vertical bar; quotation marks and line breaks inside fields are understood).
- It writes a UTF-8 CSV with a byte order mark, with the separator you choose and, if you ask, with a comma or a dot as the decimal mark.
Limits to know about
A “?” or a box already written in the file (the original character was lost when it was saved) cannot be repaired: the information no longer exists, and the tool does not guess it. The automatic choice between Windows-1252 and ISO-8859-15 relies on the letters “œ” and “€”; when in doubt, force the encoding. The automatic choice between Windows-1252 and Mac OS Roman counts accented letters of Western European languages (French, Spanish, Portuguese, German, Scandinavian); for other alphabets, choose the encoding yourself. Numbers are changed only if they look like “12.5” or “12,5” alone in their cell; a version such as “v1.2” or a date is never converted.
Formula used and sources
Repair: each character of the damaged text is replaced by the Windows-1252 byte it decodes from, then the bytes are read again as UTF-8; the repair is kept only if the result is valid UTF-8.
Separator: the one that gives the most columns with a constant number of columns over the first rows.
- Behavior of the tool checked with files built in several encodings (the site’s test suite) — checked by trial, not compared with real exports from software
- “windows-1252” encoding table of the browser (WHATWG Encoding standard), used for the inversion — declared: table supplied by your browser, not re-read here