CSV Formatter and Viewer
Parse and reformat CSV correctly, including quoted fields, escaped quotes, embedded commas and newlines inside values.
Treat the first row as column names
Trim whitespace from unquoted fields
Drop rows where every field is empty
How it works
- Type or paste your CSV data into the text area.
- Choose a delimiter or let the tool auto-detect it, and set parsing options.
- View the parsed table, then copy the reformatted CSV or JSON output.
Frequently Asked Questions
Why do other CSV tools mangle my file?
Because they split on commas. That breaks the moment a field is quoted and contains a comma, a doubled quote, or a newline — all of which are ordinary, valid CSV. This parser is a character-by-character state machine that tracks whether it is inside quotes, which is what makes those cases work.
Does it detect the delimiter?
Yes, by counting candidates OUTSIDE quoted regions. That distinction matters for European CSV, which is semicolon-delimited with commas inside quoted decimals — a naive count picks the comma and mangles every row. Comma, semicolon, tab and pipe are all supported, and you can override the guess.
What happens to rows with the wrong number of fields?
They are reported, with their row number and field count, rather than being silently padded or truncated. Ragged rows almost always indicate a real problem in the data.
Does it handle a byte-order mark?
Yes. A UTF-8 BOM is detected and stripped, and the fact is reported. Left in place it becomes part of the first header name, which is why a column called "id" mysteriously fails to match.