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/ Your data stays in your browser.
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?
- Paste your CSV, or open a file. The input delimiter is auto-detected unless you set it.
- Choose the output delimiter (same as input, comma, semicolon, tab or pipe) and the quoting style.
- Pick LF or CRLF line endings and decide whether cells are trimmed.
- 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:
id; name ;city 1; Alice ;"Paris" 2;"Bob ""B"" Durand"; Lyon 3;Chloé;Nice
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.
Related tools
CSV Validator
Check that a CSV is well-formed before importing it, and get a list of problems with line numbers.
JSON & Data
CSV Delimiter Converter
Convert CSV between comma, semicolon, tab, pipe and custom delimiters without breaking quoted fields.
JSON & Data
CSV Viewer
Paste CSV text or open a .csv file and inspect it as a table, with row and column counts and the detected delimiter.
JSON & Data
CSV Sorter
Order the rows of a CSV by one column, comparing values as text, natural text, numbers or dates.
JSON & Data
CSV Deduplicator
Find and remove duplicate rows in a CSV, comparing whole rows or only the columns you choose.
JSON & Data
Remove Empty Lines
Strip blank lines from pasted text in one click, or keep a single blank line between paragraphs.
Text Tools
Trim Lines
Remove the spaces and tabs at the start and end of each line of a list or block of text.
Text Tools
TSV to CSV Converter
Paste tab-separated text, for instance cells copied from a spreadsheet, and get valid CSV with correct quoting and the delimiter you need.
JSON & Data