TSV to CSV converter — tab-separated to comma-separated, and back

Paste tab-separated data, for example cells copied from a spreadsheet, and get valid CSV with every comma, quote and padded value safely quoted, or switch direction to turn CSV into TSV.

Live demo · real result from this tool
Convert

CSV

name,city,note
Asha Rao,Bengaluru,"likes tea, coffee"
"John ""JJ"" Smith",London,

Processed on your device — nothing is uploaded.

How to use the TSV to CSV converter

  1. Paste your data into the Data box. The sample has three tab-separated columns with a comma and quotes in the values.
  2. Choose the direction under Convert: TSV → CSV (default) or CSV → TSV.
  3. Copy the result, or download it as data.csv or data.tsv.

What it does and when to use it

Spreadsheets copy as tabs, many databases and command-line tools export TSV, and lots of import screens only accept CSV. Simply replacing tabs with commas breaks as soon as a value contains a comma, such as an address or a price like 1,299. This tool rebuilds each row with proper CSV quoting, so the number of columns stays right when the file is opened elsewhere.

The reverse direction helps when you want to paste CSV into a spreadsheet as separate cells, or feed a tool that splits on tabs.

Once you have CSV, the CSV to JSON converter, the CSV to Markdown table tool and the CSV column aligner can take it further.

How it works

The text is parsed with the papaparse library in your browser, split on tabs (or on commas for CSV → TSV). Blank lines are skipped. Each cell is then written out again:

  • TSV → CSV: a cell is quoted when it contains a comma, a double quote, a line break, or starts or ends with a space; inner quotes are doubled.
  • CSV → TSV: quotes are removed unless the cell contains a tab, a double quote or a line break.

Rows are joined with CRLF. Rows with more or fewer cells than the header are kept as they are.

Worked examples

These are the tool’s own outputs.

The sample. Three tab-separated rows become:

name,city,note
Asha Rao,Bengaluru,"likes tea, coffee"
"John ""JJ"" Smith",London,

The comma in the note and the quotes in the name are escaped, and the empty last cell is kept.

Prices and padded values. From sku, price, qty columns with A-1, 1,299 and 45 (with a leading space), the row becomes A-1,"1,299"," 45", so the space is not lost by readers that trim unquoted fields.

CSV back to TSV. "Rao, Asha",Bengaluru becomes Rao, Asha and Bengaluru separated by a tab, because a comma needs no quoting in TSV. A value with a line break inside stays quoted.

Limits and tips

  • TSV is read literally. A cell cannot contain a tab or a line break, and quotes are never treated as wrappers. Spreadsheet exports that quote cells with line breaks need the CSV tools instead.
  • CSV to TSV shows parse warnings, such as an unclosed quote, under the result. If a row looks wrong, open the source in a CSV viewer to inspect it.
  • Other delimiters such as semicolons or pipes are not offered here; CSV to JSON and the column aligner can detect them.

Frequently asked questions

Why do some values get quotes around them?
In CSV a comma separates fields, so a value that contains a comma, a double quote, a line break, or a leading or trailing space must be wrapped in double quotes. Quotes inside the value are doubled. This follows RFC 4180, which Excel, Google Sheets and most CSV readers expect.
Can I paste straight from Excel or Google Sheets?
Yes. Copying cells from a spreadsheet puts tab-separated text on the clipboard, which is exactly what this tool reads.
What line endings does the output use?
Rows are separated by CRLF (carriage return plus line feed), the line ending RFC 4180 specifies. Line breaks inside a quoted value are kept as they were.
Is a value that starts with a double quote safe?
Yes. TSV has no quoting rules, so the tool splits each line at tabs and keeps every quote mark as text. A value such as "Hi" she said becomes """Hi"" she said" in the CSV, which reads back as the original.
Does it change numbers or dates?
No. Every cell is copied as text. 1,299 stays 1,299, wrapped in quotes because of the comma, and leading zeros are kept.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close