CSV Formatter Online

Paste a CSV that is nearly right and get one that is. Quoting is normalised, the delimiter is whatever you choose, blank rows go, and stray whitespace around values is trimmed.

Input

Read on this page. Nothing is uploaded.

The cleaned CSV will appear here.

What gets fixed

Quoting is rewritten to the rule in RFC 4180: a field is quoted when it contains the delimiter, a quote or a line break, and an embedded quote is doubled. Files that quote everything, or quote nothing and hope, both come out correct.

Ragged rows are padded. A file where some rows have fewer fields than the header is common in hand-edited exports, and leaving it ragged means every downstream tool disagrees about where the columns are.

Whitespace around values is trimmed. A field written as ` name ` almost never means to include those spaces, and they break joins and lookups in ways that take an hour to find.

Encoding and Excel

Excel on Windows assumes a CSV is in the local code page unless the file opens with a UTF-8 byte order mark. Adding one is the single fix for the accented characters that arrive as garbage, and it is a checkbox here.

Questions

Will formatting change my data?

Values are trimmed of surrounding whitespace and blank rows are dropped. Nothing else about the values changes. If you need the whitespace kept, do not use this tool, use the plain converter.

Other tools