csv→csv

CSV Formatter & Validator

Format CSV with consistent quoting, and catch rows with the wrong number of columns.

By opening this website or using its tools, you agree to our Terms and Privacy Policy.

Network activity during processing
0 bytes uploaded

Your file never leaves your browser during processing

How it works

To format CSV, paste it above — the delimiter is auto-detected (or choose comma, semicolon, or tab), the file is re-written with consistent quoting, and any row with a different column count than the first row is flagged, all computed locally with no upload.

CSV looks simple but has real edge cases: a field can contain the delimiter itself, a literal quote character, or even a line break, and RFC 4180 handles all three by wrapping the field in double quotes and doubling any quote characters inside it. This parser is written directly against that spec — it walks the input character by character tracking whether it is inside a quoted field, rather than naively splitting on commas, which breaks the moment any field contains one.

Delimiter detection looks at the first line and counts how many times each of comma, semicolon, and tab appears, picking the most frequent — semicolon-delimited CSV is common from European spreadsheet software that uses comma as a decimal separator, and this catches that automatically rather than assuming comma. You can also force a specific delimiter if auto-detection guesses wrong.

Validation checks that every row has the same number of fields as the first row (typically the header) — a row with too few or too many fields almost always means a delimiter appeared unescaped somewhere, or a row got merged or split incorrectly upstream. This tool flags which rows disagree; it does not attempt to guess and repair what went wrong, since a wrong automatic fix is worse than a flagged one — see the CSV cleaner tool for that heavier job.

FAQ

How is the delimiter detected?

By counting how often comma, semicolon, and tab each appear in the first line and picking the most frequent one. You can override the guess with the delimiter dropdown.

What does "ragged row" mean?

A row with a different number of fields than the first row. It almost always signals a formatting problem — an unescaped delimiter inside a field, or a row that got split or merged incorrectly.

Does this fix malformed CSV automatically?

No — it validates and reports problems rather than guessing a repair. A dedicated CSV cleaner for auto-repairing malformed data is a separate, heavier tool.

Related tools