Repair broken CSV · split large files
For CSV files where the text came out garbled, everything landed in one column, or the file is too big to open. Your file never leaves your computer.
What can and cannot be fixed
Recoverable
Korean text garbled as ??? or 가나 (a Korean EUC-KR file read as UTF-8, or a UTF-8 file read as Western European), and rows where everything landed in one column because the delimiter was a semicolon or a tab. Only the reading was wrong — the bytes are intact, so this is reversible. Accents doubled into pairs such as "é" or "ñ" are undone too, but only when they are common throughout the file. Files saved as Windows-1252, where accents show as "A�o", are not repaired — re-save the original as "CSV UTF-8" instead.
Not recoverable
If Excel saved 01012345678 as 1012345678, the leading zero is simply not in the file any more. Same for 1.23E+15. We point these out, but we will not invent values that are gone.
Stops it happening again
You can choose how to save so Excel will not convert those columns back to numbers. That is the fix that actually holds.
Which parts of a broken CSV can be recovered, and which cannot?
A CSV whose text shows up as � or 가나, or whose rows land entirely in one column, is usually not damaged at all; it was simply read the wrong way. This tool diagnoses the encoding and the delimiter and puts them right, and it points out values Excel has already destroyed. When saving, you can stop Excel from doing it again, and a file that is too big can be split with the header kept on every part.
A closer look
Recovery works when the original bytes are still there. A Korean EUC-KR file read as UTF-8 turns its text into �, and reading it again as EUC-KR restores it. A UTF-8 file that was read as Western European (Latin-1 or Windows-1252) and saved turns ñ into ñ and Korean into 가나; the tool maps those characters back to their bytes and reads them as UTF-8 again, but only when such characters make up more than 5% of the text (a file of mostly numbers with a few accents may not reach that) and the result has no broken characters. The delimiter is chosen from the first 20 non-empty lines by counting commas, semicolons, tabs and pipes outside quotes and preferring one that is both frequent and consistent from line to line.
Recovery is impossible when the values themselves were changed before saving. If Excel read 01012345678 as a number and saved it, the file only holds 1012345678, and a number saved as 1.23E+15 has lost its trailing digits. The tool flags all-digit columns where most values share a length but some are exactly one digit short, and values in scientific notation, but it never invents what is gone. What it can do is save safely: with Keep numbers with leading zeros as text on, numbers that start with 0 or have 12 or more digits are written as ="01012345678", which Excel reads as text.
How to use it
- Drop a CSV, TSV or TXT file, or pick one with Choose file. Pasted text and Excel files are not accepted here.
- Read the encoding and delimiter findings and any warnings under What we found, then check Preview (first 20 rows) to see that the columns split correctly.
- Under How to save, turn on Keep numbers with leading zeros as text if the file will be opened in Excel. Add a BOM for Excel is on by default; turn it off for systems that read the BOM as part of the first column name.
- For a large file, choose By row count (50,000 rows by default) or By file size (10 MB by default) under Split, then save. The output is comma-separated UTF-8 CSV with _fixed added to the name.
When it helps
Common snags
Tip If you still have the original export, load that file before it has ever been opened and saved in Excel; its leading zeros and long numbers are still intact and can be saved as text.
FAQ
The text shows as ??? or 가나
Those are two different causes: the first is a file in a legacy encoding read as UTF-8, the second is a UTF-8 file read as Western European. This tool works out which one it is. It can undo the second, and the first when the file is Korean text saved as EUC-KR. It does not repair Windows-1252 files (accents showing as "A�o"); re-save those from Excel as "CSV UTF-8".
The whole row is in one column
The delimiter is a semicolon or a tab, not a comma. European Excel saves with semicolons. This tool counts delimiters per line to find the real one.
My leading zeros disappeared
Excel converted them to numbers when it opened the file, so they are already gone from it. They cannot be recovered. If you still have the original export, open that here instead and save with "keep as text" turned on.
How many rows can it handle?
As many as your browser has memory for — hundreds of thousands is fine. If the result is too big for Excel, use Split.
Is my file uploaded?
No. Reading, repairing and saving all happen in the browser.