Repair a Broken CSV
Most "invalid CSV" errors come from four things: rows with the wrong number of columns, a quote that was never closed, a byte-order mark on the first header, and mixed line endings. This tool fixes all four in one pass and shows you a report of exactly what it changed — so you can decide whether the fix is safe before you rely on the output.
How to repair a CSV
- Paste the file or drop it in. The report table lists the detected delimiter, quote problems, and how many rows were the wrong width.
- Choose how to treat ragged rows. Pad / truncate is the safe default; merge is right when an unescaped comma split one field in two; drop and list keeps your data honest by quarantining anything suspect.
- Leave strip BOM and drop blank rows on unless you have a reason not to.
- Check the report, then copy or download the repaired file. Output is re-quoted properly and comma-delimited.
What each fix actually does
- Ragged rows. The header row sets the expected width. Short rows get empty fields appended; long rows are truncated, merged, or quarantined depending on your choice.
- Delimiter detection. Semicolon, tab, and pipe files are recognised and re-emitted as commas — the usual cause of "the whole row is in one column".
- Quote problems. An unclosed quote makes a parser swallow the rest of the file into one field. Affected row numbers are listed so you can look at the source.
- BOM and line endings. The BOM is removed and all breaks normalised to LF, which fixes
idheader names and phantom blank rows. - Whitespace. Optional trimming removes stray spaces, tabs, non-breaking spaces, and zero-width characters around each field.
When repair isn't the answer
If rows are ragged because the source system escapes quotes with a backslash instead of doubling them, or because the file is really two concatenated exports with different headers, padding the rows just hides the problem. The report is there to make that visible: a file where most rows are the wrong width is usually a delimiter or export bug, not damage worth patching. In that case fix the export, or split the file first with Split CSV.
FAQ
Will repairing change my data?
Padding adds empty fields, truncating discards trailing fields, and merging joins them back into the last column — all visible in the report. Blank-row removal and BOM stripping never touch real values.
How do I know which rows were broken?
The report counts short and long rows, and in quarantine mode lists their row numbers and actual widths so you can inspect the source.
Can I just check whether a CSV is valid?
Yes — Validator reports problems without rewriting anything, and Data profile shows fill rates and type mismatches per column.
Is the file uploaded?
No. Parsing and repair happen in your browser; nothing is sent anywhere.
Privacy
100% client-side. No upload. See the privacy policy.