Check CSV structure and infer a type per column, reporting ragged rows, duplicate headers and quoting faults with line numbers.
CSV Formatter
Re-serialise CSV with correct RFC 4180 quoting and CRLF line endings, reporting structural problems.
- Free
- No sign-up
- Runs in your browser
Input
0 characters
Processed entirely in your browser. Nothing is uploaded.
Try an example
Fill in Input to continue.
Enter your input to see the result
Everything happens on this device. No upload, no account, no network request.
How to use this tool
- 1
Paste your CSV or TSV data. The delimiter is detected by counting candidates outside quoted fields.
- 2
Structural problems are reported as warnings with line numbers: ragged rows, duplicate column names, an unterminated quote, a stray BOM.
- 3
Copy or download the result.
Questions about CSV Formatter
Why CRLF line endings?
RFC 4180 specifies CRLF, and Excel expects it. A plain LF file opens correctly in most tools but can behave oddly in older Excel on Windows.
Why is my data flagged for CSV injection?
A field starting with =, +, - or @ is evaluated as a formula by Excel and Google Sheets. If the data came from an untrusted source, that is a real attack path - a cell can exfiltrate data or trigger a command prompt. Prefix such fields with a single quote before sharing the file.
Will this handle quoted fields and embedded commas?
Yes. The parser implements RFC 4180 properly: quoted fields, delimiters and newlines inside quotes, and doubled quotes as a literal quote. That is the case a split-on-comma implementation gets wrong, and it is most real data.
Is my data sent anywhere?
No. This tool runs as JavaScript inside your browser tab. There is no network request carrying your input, nothing is written to a server log, and it keeps working with your connection switched off. You can confirm it in the browser’s network panel. That matters more here than elsewhere on the site: developer tools handle tokens, keys and production data.
Does the CSV Formatter work offline?
Yes. Once the page has loaded it runs entirely as JavaScript on your own device, so the CSV Formatter keeps working with the network switched off and nothing is ever sent to a server.
Related tools
Other tools you might reach for next.
Remove duplicate rows, comparing every column or only the ones you name, keeping the first occurrence.
Keep only the columns you name, in the order you name them.
Sort CSV rows by a column, detecting a numeric column automatically and keeping blanks last in either direction.
Format and indent JSON, with optional alphabetical key sorting and a precise syntax error when it will not parse.
Strip every byte of insignificant whitespace from JSON and report the saving.
Check that JSON is syntactically valid, report its structure, and flag duplicate keys that JSON.parse accepts silently.
Compare two JSON documents structurally, by path, distinguishing a type change from a value change.