CSV Formatter
Clean up messy CSV data — auto-detect or choose the input delimiter, trim stray whitespace, and re-serialize with a consistent delimiter and RFC 4180 quoting (quote only when needed, or always).
Input
Output
Guides
What does this CSV formatter do?
CSV files exported from spreadsheets, databases and scripts are rarely consistent — some use commas, others semicolons or tabs; some pad fields with stray spaces; some mix quoted and unquoted values. This tool parses whatever you paste with a real CSV parser (not a naive comma split) and re-serializes it into clean, consistently delimited, correctly quoted CSV.
RFC 4180 quoting, briefly
The RFC 4180 convention most spreadsheet and database tools follow says:
- A field only needs quoting if it contains the delimiter, a double quote, or a line break.
- A literal double quote inside a quoted field is escaped by doubling it (
""). - Everything else can be written unquoted.
This tool's parser understands that convention on the way in — a quoted field like "Smith, John" is read as one field containing a comma, not two fields — and its serializer applies it on the way out, so quoting is added only where it's actually required.
Options
- Input delimiter — comma, semicolon, tab, or Auto-detect (picks whichever delimiter appears most often, outside quotes, on the first line).
- Output delimiter — comma, semicolon, or tab, independent of the input delimiter.
- Quote style — Quote only when needed (RFC 4180 minimal quoting) or Always quote fields (wraps every field in double quotes, useful for tools that mis-parse unquoted numeric-looking strings).
- Trim whitespace — strips leading/trailing spaces from every field, useful for CSV that was hand-edited or copy-pasted from a table.
How to use it
- Paste your CSV data into the input box.
- Pick the input delimiter, or leave it on Auto-detect.
- Choose an output delimiter and quote style.
- Copy the formatted result or download it as a
.csvfile.
FAQ
Does it handle quoted fields with commas inside them correctly?
Yes. "Smith, John",30 parses as two fields — Smith, John and 30 — not three, because the parser tracks whether it's inside a quoted field before it looks for delimiters.
Can I convert a semicolon-delimited CSV to comma-delimited? Yes — set the input delimiter to semicolon (or Auto-detect) and the output delimiter to comma.
Will it fix an uneven number of columns per row? No — this tool re-delimits and re-quotes; it doesn't reshape rows. It won't silently drop or invent columns.
Privacy
Parsing and formatting run entirely in your browser. Your CSV data never leaves your device — safe for spreadsheets containing customer data, financial records, or anything else you'd rather not upload to a server.