Built on advanced on-device AI and hardware acceleration to deliver professional-grade performance with uncompromising privacy.On-device AI — professional-grade, fully private.
Fix CSV Escaping
Repair CSV quoting, ragged rows and encodings on your device
- No upload
- 25 MB free
- Row-level diff
Drop a CSV here
.csv · .tsv · .txt · .psv · up to 25.0 MB on Free
Or paste CSV text
A byte-order mark in the file overrides this
Detected by row-width consistency, not by counting separators
What the file uses to wrap a field
Measured against the file's most common width
Quote all is required by some strict importers
CRLF is what RFC 4180 specifies
Free: one file up to 25.0 MB. Pro: up to 1 files, device-limited.
How to repair a broken CSV
- 1
Add your CSV
Drop or choose a .csv, .tsv, .txt or .psv file, or paste the text. The delimiter, quote character and encoding are detected from the file; override any of them if the detection is wrong.
- 2
Read the issue report
Every problem found is listed with a count and the affected row numbers, whether or not the switch that fixes it is on. Escaped quotes, embedded newlines, unterminated quotes, ragged rows, BOMs, mixed line endings, smart quotes and invisible characters are all reported.
- 3
Choose the repairs
Pick how ragged rows are handled: leave them, pad short rows, truncate long ones, merge the extras back into the last column, or quarantine anything that does not match. Then switch on any cleanup you want and set the output delimiter, quoting policy and line ending.
- 4
Repair, check the diff, download
Every changed row is highlighted in the preview and hovering one shows the original line. Download the repaired file or copy it. Nothing is uploaded at any point.
What this CSV Escape / Fix tool offers
A CSV that will not import is usually not corrupt — it is inconsistently quoted, unevenly wide, or written in an encoding the reader guessed wrong. This tool reads the file the way a strict parser does, tells you every structural problem it found with the row numbers, lets you decide what to do about each one, and writes the file back so that what you meant is what the next program reads.
- Escaped quotes and newlines survive — A doubled quote inside a quoted field is a literal quote, and a line break inside one belongs to the field, not to the file. Both are preserved and re-escaped correctly on output.
- An issue report, not just a result — Everything found is listed with a count and row numbers whether or not the switch that fixes it is on, so you are told about a problem you have not thought to look for.
- A row-level diff — Changed rows are highlighted in the preview and hovering one shows the line exactly as it was written before, so a repair is something you can check rather than trust.
- Four answers to ragged rows — Pad, truncate, merge the extras back into the last column, or quarantine and list them. Only truncate and quarantine remove anything, both are opt-in, and both report what they took.
- Detection that is not fooled by quotes — The delimiter and quote character are chosen by parsing a sample with each candidate and scoring row-width consistency, so a semicolon file containing a quoted address is not read as comma-separated.
- Output you control — Delimiter, quote character, minimal or full quoting, LF, CRLF or CR line endings, and whether the file ends with a newline. The extension follows the delimiter, so a pipe-separated file is not called .csv.
What gets repaired, exactly
Every item below is detected on every file, listed with a count and the first affected row numbers, and either repaired automatically or offered as a switch. Nothing is removed from your data unless you asked for it in so many words.
- Fields containing a quote character — Escaped on output as two quotes so they read back as one. A parser that toggles on every quote instead deletes both characters and the field silently loses content.
- Newlines inside quoted fields — Kept with their row. Splitting the file on newlines first — which is the common shortcut — turns one row into two, and the second one is not valid CSV.
- An unterminated quote — Reported with its row number. The rest of the row is taken as the field's value rather than the parser running to the end of the file and merging everything behind it.
- Ragged rows — Rows narrower or wider than the file's usual width, counted separately in each direction so you can see whether the file is short of data or has been split by a stray delimiter.
- Byte-order marks — Stripped, always. A BOM left in place becomes part of the first column's name, which is why an imported sheet sometimes has a first column nothing can match by name.
- Mixed line endings — Reported when a file contains more than one kind. RFC 4180 specifies CRLF; you can write LF, CRLF or CR, and the file becomes consistent either way.
- Smart quotes and invisible characters — Curly quotes from word processors, zero-width characters and non-breaking spaces are detected and can be straightened, removed or converted to ordinary spaces.
- Header names — Empty column names are filled and repeated ones are numbered, so every column can be addressed by name after the import.
Why fix CSV escaping?
Malformed or inconsistently quoted CSV does not usually fail loudly. It imports, and it is wrong — a field short here, two rows merged there, a column of numbers that became text. Re-writing the file with correct escaping makes it read the same way in every tool that opens it.
- Fewer import errors — Consistent quoting means a database, a spreadsheet and a script all resolve the same fields from the same bytes.
- Silent corruption becomes visible — The issue report and the row-level diff turn 'the import looks odd' into a row number you can go and look at.
- Safer handoffs — A file that has been through a strict reader and written back cleanly is one that the next team does not have to guess about.
- Runs on your device, not our servers — Customer lists, payroll exports and financial data are repaired on your own device, so a broken file never becomes a disclosure.
Ragged rows: leave, pad, truncate, merge or quarantine
A ragged file is one where the rows are not all the same width. That is the defect most likely to make an import fail outright, and it is the one where the right answer genuinely depends on what caused it — so the tool asks rather than guessing.
- Leave — The default. Widths are reported but nothing is changed, which is the correct choice when the raggedness is real data rather than damage.
- Pad — Short rows gain empty cells until they match. Long rows are left alone: shortening a row is the only ragged operation that destroys data, and it never happens as a side effect of asking for padding.
- Truncate — Long rows are cut down to the file's usual width and the number of cells dropped is reported. Use it when the extra fields are known to be junk.
- Merge — The extra fields are joined back into the last column with the delimiter that split them. Nothing is lost, and it is usually the right answer when a value contained an unescaped delimiter.
- Quarantine — Any row that does not match the usual width is removed and its row number is listed, so you can extract and inspect the suspect rows separately.
Options at a glance
- Encoding — Auto, UTF-8, UTF-16LE, UTF-16BE, Windows-1252 or ISO-8859-1. A byte-order mark in the file always wins over the dropdown, because the file knows and the dropdown is a guess.
- Delimiter and quote character — Auto-detected by row-width consistency, or forced to comma, semicolon, tab or pipe, quoted with double quotes, apostrophes or nothing.
- First row is a header — Turns on header-name repair and lets the header break a tie when no row width is more common than any other.
- Ragged rows — Leave, pad, truncate, merge or quarantine — described in full above.
- Trim cell whitespace — Removes leading and trailing spaces from every cell before the file is written.
- Remove empty rows — Drops rows where every cell is blank or whitespace. A row with one non-empty cell is always kept.
- Straighten smart quotes — Converts the curly quotes a word processor inserts into straight ones, which are what a CSV reader expects.
- Strip invisible characters — Removes zero-width characters and turns non-breaking spaces into ordinary spaces, so a cell that looks blank actually is.
- Repair header names — Fills empty column names and numbers repeated ones, so every column can be addressed by name.
- Output delimiter and quote character — Keep the file's own, or write comma, semicolon, tab or pipe. The file extension follows the delimiter.
- Quoting policy — Minimal quotes only the fields that need it. Quote all fields wraps every value, which some strict importers require.
- Line ending — LF, CRLF or CR, applied consistently. CRLF is what RFC 4180 specifies.
- End file with a newline — On by default. Most tools expect a trailing terminator; turn it off if yours does not.
- Download as — A custom filename for the repaired file. Otherwise the original name gains a -fixed suffix, so the repair never lands on top of the broken original.
Which encoding and line ending should I pick?
Two settings account for most files that look like mojibake or import as a single enormous column. Both have a right answer that the file itself usually knows.
- Leave encoding on Auto first — A byte-order mark is the file stating its own encoding, and it is honoured over anything chosen by hand. With no mark, valid UTF-8 is read as UTF-8 and anything else as Windows-1252, which is what a Western-locale spreadsheet writes when nobody asked it for anything.
- Accented characters look wrong — The file is almost certainly Windows-1252 or ISO-8859-1. They are not the same: bytes 128 to 159 are curly quotes and dashes in one and control characters in the other, so try Windows-1252 first and ISO-8859-1 if the result still looks off.
- The whole file lands in one column — It is probably UTF-16, which a spreadsheet writes when asked for Unicode text. Read as UTF-8 it becomes a field full of null bytes and every row runs together. Pick UTF-16LE, or add the file again and let Auto find the mark.
- Choose CRLF for maximum compatibility — RFC 4180 specifies CRLF and strict validators warn about anything else. LF is the safer choice for anything that will be read by scripts or stored in version control.
- Mixed line endings are worth fixing — A file containing both is the one that breaks naive readers, because a lone carriage return in the middle of an otherwise LF file ends a row where nothing expected one. Whichever you choose, the output is consistent.
Frequently asked questions
How does the CSV escape fixer work?
Add your CSV and the tool parses it with a quote-aware reader, so a delimiter, a newline or a doubled quote inside a quoted field is understood as data rather than as structure. It then reports everything it found and re-writes the file with consistent, well-formed quoting so spreadsheets, databases and scripts read every field the way you intended.
What quoting and newline problems does it repair?
Any field containing the delimiter, a quote character or a line break is wrapped in quotes on output, and a quote inside a field is escaped as two quotes (RFC 4180 style). Doubled quotes are read back as a single literal quote rather than being dropped, newlines inside quoted fields keep their row together instead of splitting it, and a quote that is never closed takes the rest of its row rather than swallowing the delimiters behind it.
Is my CSV uploaded anywhere?
No. Everything happens on your device: the file is read, repaired and written without leaving the page, and nothing is uploaded, stored or sent to any server. Confidential exports, customer lists and financial data stay on your own machine, and the tool keeps working once the page has loaded even with no connection.
What happens to rows with the wrong number of columns?
You choose. Leave keeps them exactly as they are. Pad fills short rows with empty cells. Truncate cuts long rows down and tells you how many cells it dropped. Merge joins the extra fields back into the last column, which loses nothing and is usually right when a row was split by an unescaped delimiter. Quarantine removes any row that does not match and lists the row numbers it took out.
How does it decide how many columns a row should have?
By the most common row width in the file, not by the header. An export that gained columns over time has a header shorter than its body, and squaring everything to the header would delete real data from every row. When no width is more common than the others and there is a header, the header breaks the tie. Blank lines are never counted and never padded.
Can I trim whitespace, remove empty rows and clean invisible characters?
Yes, and each one is reported before you switch it on. Trim removes leading and trailing spaces from every cell. Remove empty rows drops rows where every cell is blank. Strip invisible characters removes zero-width characters and turns non-breaking spaces into ordinary ones. Straighten smart quotes converts the curly quotes that word processors insert back into straight ones.
Which delimiters, quote characters and encodings can it handle?
Comma, semicolon, tab and pipe, quoted with double quotes, apostrophes or nothing at all. The delimiter and quote character are detected by parsing a sample with each candidate and scoring how consistent the row widths come out, so a delimiter sitting inside a quoted address does not fool it. Encodings are UTF-8, UTF-16LE, UTF-16BE, Windows-1252 and ISO-8859-1, and a byte-order mark in the file always overrides the dropdown.
How big a file can I repair, and can I do several at once?
Free repairs one file at a time up to 25 MB, with every repair, every diagnostic and every output option included — nothing about the repair itself is held back. Pro removes the size cap in favour of what your device can handle, repairs up to 20 files in one go and delivers them as a single ZIP.
from 65 ratings
Rate this tool
Tap a star — it takes a second