DevSwitch.net
Back to Tools
⇄

CSV to TSV Converter

Convert CSV (Comma-Separated Values) to TSV (Tab-Separated Values)

File Converters

Tip: TSV uses tabs instead of commas to separate values, making it ideal for data that contains commas.

Runs in your browser

Input CSV

Convert CSV to TSV in your browser

Paste CSV, open a .csv file or drop it on the input window, and the tab-separated version appears as you type. Every comma that separates two fields becomes a tab, while a comma inside a value stays part of that value. Copy the result or download it as a .tsv file.

Quoted fields are read the way spreadsheets export them, by the rules of RFC 4180. A value like "Portland, OR" or a note with a line break stays in one column, and in the TSV the quotes around "Portland, OR" are no longer needed.

CSV to TSV example

Real output for a two-row export. The quotes around the city are dropped, and the ZIP code 02134 keeps its leading zero:

customers.csv
id,name,city,zip,active
1,Mara Quill,"Portland, OR",97201,true
2,Theo Brandt,Boston,02134,false
customers.tsv
id	name	city	zip	active
1	Mara Quill	Portland, OR	97201	true
2	Theo Brandt	Boston	02134	false

What changes between commas and tabs

Only the separators and the quoting change. Every value is written back exactly as it was read:

  • CSV

    "Portland, OR"

    TSV

    Loses its quotes. A comma is ordinary text in TSV, so the cell is written as Portland, OR.

  • CSV

    02134, 4.50

    TSV

    Stay exactly as typed. Leading zeros, trailing decimal zeros, dates and long IDs are copied, not reformatted.

  • CSV

    A quoted field with a tab in it

    TSV

    Gets double quotes in the TSV, so the tab inside it does not split the cell in two.

  • CSV

    "say ""hi"""

    TSV

    Keeps its quotes, with each inner quote doubled. A TSV cell that holds a double quote or a line break is quoted the same way as in CSV.

When TSV is the better choice

Paste tab-separated text into Excel or Google Sheets and each value lands in its own cell, with no import dialog and no guessing about the separator. Commas in addresses, prices or notes cause no trouble, because the tab is the only separator.

On the command line, cut splits lines on tabs by default, so a column can be taken out of a TSV file without a CSV parser.

Need the commas back?

The TSV to CSV converter puts commas back between the values and quotes every value that contains one.

CSV to TSV questions

Click Open file and pick the .csv, or drop the file on the input window. It is read in your browser and converted straight away; Download saves the result as a .tsv file.

Only the separators and the quotes. Values come out as they went in, so 02134 keeps its zero and 4.50 its last digit. The header row is tidied: spaces around names are trimmed, an empty name becomes column_N, numbered by its position, and a repeated name gets its position added.

It contains a tab, a double quote or a line break. The quotes keep it in one cell, and a quote inside it is written twice: "".

No. Only commas are read as separators, so a semicolon file comes out as a single column. Export the file again as comma-separated, or replace the semicolons with commas first.

No. Converting runs in your browser, and an opened file is read there too.