CSV Formatter & CSV to TSV Converter

Clean up CSV/TSV data, or convert between the two - free, no upload.

CSV formatter
Input delimiter
Output delimiter
Result

What this tool does

Paste your CSV or TSV, pick an input and output delimiter (or leave input on auto-detect), and get back cleanly re-formatted, consistently quoted data.

Parses CSV or TSV correctly, including quoted fields that contain the delimiter, quote characters, or line breaks.

Re-serialises the data with consistent line endings and minimal, correct quoting.

Converts between comma, tab and semicolon delimiters, so it also works as a CSV-to-TSV or TSV-to-CSV converter.

Optionally trims stray whitespace from around every cell.

Auto-detects the input delimiter by counting comma, tab and semicolon occurrences in the first line and picking whichever appears most often.

Normalises every output row to CRLF (\r\n) line endings, regardless of whether the input used \n or \r\n.

How to use it

  1. Paste your CSV or TSV data.
  2. Choose the input delimiter, or leave it on auto-detect.
  3. Choose the output delimiter.
  4. Copy or download the formatted result.

Why use this formatter

CSV files vary in delimiters, quoting and line endings, and a stray quote breaks imports. Re-writing them cleanly, or switching to TSV, prevents import errors.

Why we built it

We built the CSV formatter on an RFC 4180-aware parser, so fields with commas, quotes and line breaks survive. Process further with the CSV column extractor and the CSV duplicate remover.

If your task goes further, try the CSV to XML Converter and the CSV Splitter.

Who this tool is for

  • Analysts cleaning exports
  • Developers preparing data
  • Anyone mixing CSV and TSV files

When to use it

  • Cleaning a CSV before importing.
  • Converting CSV to TSV or back.
  • Fixing inconsistent quoting.
  • Normalising line endings.

Why a real parser instead of splitting on commas

Naively splitting a CSV line on commas breaks as soon as a field contains one.

A quoted CSV field like "Smith, John" contains a comma that shouldn't be treated as a column separator, and a quoted field can even contain an embedded line break. Simply splitting text on commas or newlines gets both of these wrong. This tool implements the actual RFC-4180 quoting rules - including doubled quotes to represent a literal quote character inside a field - so the reformatted, delimiter-converted output stays correct even on the specific rows that would trip up a naive splitter.

How auto-detect and minimal quoting actually work

Two small behaviours decide what the output looks like: how the delimiter is guessed, and when a cell gets wrapped in quotes.

Delimiter auto-detection

When the input delimiter is left on Auto-detect, the tool looks only at the first line of the pasted text and counts how many times a comma, a tab and a semicolon each appear in it. Whichever of the three shows up most often is used as the delimiter for the whole file. If none of them appear at all, it falls back to comma. This is a first-line heuristic, not a full-file analysis, so a file whose first line happens to be unusually sparse can be mis-detected - picking an explicit input delimiter from the dropdown always overrides it.

Minimal quoting on output

  • A cell is wrapped in double quotes only if it contains the output delimiter, a double-quote character, or a line break.
  • A literal double quote inside a quoted cell is written as two double quotes (""), per RFC 4180.
  • A cell with none of those characters is written unquoted, even if the input had it quoted - re-serialising doesn't preserve unnecessary original quoting.
  • Every output row ends with a CRLF (\r\n), the RFC 4180 convention, no matter which line endings the input used.

Because quoting is recomputed from scratch, a field that was quoted in your original file but doesn't actually need quoting (no delimiter, quote or line break inside it) will come out unquoted after formatting. That's expected - it's not a sign of data loss.

What you give it, and what you get back

Input and output of CSV Formatter & CSV to TSV Converter
ItemDetails
InputCSV or TSV text.
OptionsDelimiter detection or choice.
OutputA clean file with consistent quoting.

Issues you may run into

Common problems with CSV Formatter & CSV to TSV Converter
What you seeWhy it happensWhat to do
Wrong delimiter detectedFew columns or unusual data.Choose it manually.
Formatting differs from the originalThe file is re-serialised.This is expected.
An error message appearsThe input is not valid for this format.Fix the problem the message points to.

Assumptions and limitations

Frequently asked questions

How do I format or clean up a CSV file for free?

Paste it in - it's re-parsed correctly and re-serialised with consistent line endings and minimal quoting.

How do I convert CSV to TSV, or TSV to CSV?

Set the output delimiter to Tab for CSV to TSV, or to Comma for TSV to CSV - the input delimiter can stay on auto-detect.

Does this handle quoted fields with commas inside them?

Yes - it uses a real RFC-4180-aware parser, so quoted commas, quotes and line breaks inside a field are all handled correctly.

What does the trim whitespace option do?

It removes leading and trailing spaces from every cell, which is a common source of messy-looking spreadsheet imports.

How does auto-detect choose the delimiter?

It counts how many commas, tabs and semicolons appear in the first line of your input and picks whichever is most frequent, defaulting to comma if none are found.

What line endings does the formatted output use?

CRLF (\r\n) on every row, the RFC 4180 convention, regardless of whether your original file used \n or \r\n.

Is my data uploaded anywhere?

No. Everything happens in your browser.