Skip to content

CSV Formatter

Re-serialize messy CSV into a consistent file: same quoting rules, trimmed cells, one delimiter and one line-ending style.

Processed locally in your browser

Options
Blank lines are removed. Line breaks inside quoted cells are preserved.0 chars · 0 lines
The result will appear here.

What is CSV Formatter?

CSV files produced by different tools disagree on many small details: some quote every field, others only when required; some pad cells with spaces; line endings switch between LF and CRLF; blank lines slip in. Strict importers reject such inconsistencies.

The formatter parses the input with a real CSV parser and writes it back following the rules you choose: quoting only when needed, minimal, all non-numeric or every field; a new delimiter; LF or CRLF; trimmed cells. Line breaks inside quoted cells are preserved.

How does it work?

  1. Paste your CSV, or open a file. The input delimiter is auto-detected unless you set it.
  2. Choose the output delimiter (same as input, comma, semicolon, tab or pipe) and the quoting style.
  3. Pick LF or CRLF line endings and decide whether cells are trimmed.
  4. Copy the result or download formatted.csv.

Common use cases

  • Preparing a file for an importer that demands CRLF endings and quoted text fields.
  • Removing stray spaces and blank lines from a hand-edited export.
  • Making diffs readable by writing every file with the same quoting and line endings.
  • Standardizing exports from several systems before merging them.

Examples

Try this input in the tool above:

Input
id; name ;city
1; Alice ;"Paris"
2;"Bob ""B"" Durand"; Lyon 

3;Chloé;Nice
Output
id;name;city
1;Alice;Paris
2;"Bob ""B"" Durand";Lyon
3;Chloé;Nice

Privacy

CSV Formatter runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.

Limitations

Trimming changes cell content, so leave it off when leading or trailing spaces are significant. Blank lines are always dropped.

Frequently asked questions

When is a field quoted in the "Only when needed" mode?

When it contains the delimiter, a double quote, a line break, or starts or ends with a space. Quotes inside a field are doubled, as RFC 4180 requires.

What is the difference between LF and CRLF?

LF is the Unix/macOS line ending and CRLF is the Windows one. Most tools read both, but some importers and Windows programs expect CRLF.

Does formatting change the number of rows?

Only blank lines are removed. Every other row, including rows with quoted line breaks, is kept as is.

More tools in JSON & Data →