TSV to CSV Converter
Convert Tab-Separated Values (TSV) to Comma-Separated Values (CSV)
Tip: Paste your TSV data with tab-separated values. Each tab will be converted to a comma, and values containing commas will be properly quoted.
Runs in your browserInput TSV
Convert TSV to CSV in your browser
Paste tab-separated text, open a .tsv file or drop it on the input window, and the CSV appears as you type. Each tab between two values becomes a comma, and each line stays one row. Copy the result or download it as a .csv file.
The CSV follows RFC 4180, the format Excel, Google Sheets and most databases import: a value that holds a comma, a double quote or a line break is put in double quotes, so it stays in its own column.
TSV to CSV example
Real output for a small product list. The product name with a comma gets quotes, and the SKUs keep their leading zeros:
sku product qty price
00412 Desk lamp, brass 2 39.9
00977 USB-C cable 10 4.50
sku,product,qty,price
00412,"Desk lamp, brass",2,39.9
00977,USB-C cable,10,4.50
When a CSV field gets quotes
A TSV cell needs no quotes for a comma, a CSV field does. Each cell is checked on its own:
-
TSV
Desk lamp, brassCSVBecomes
"Desk lamp, brass", so the comma is not read as a new column. -
TSV
say "hi"CSVBecomes
"say ""hi""": the field is quoted and each quote inside it is written twice. -
TSV
A cell with a line break
CSVIs quoted too, and the line break stays inside the field instead of starting a new row.
-
TSV
00412,4.50CSVAre written as they are, with no quotes. The values are copied, not reformatted, so leading zeros and decimal places survive.
From copied spreadsheet cells to a CSV file
When you copy a range of cells in Excel or Google Sheets, the clipboard holds TSV: tabs between columns, a line per row. Paste it here and download the CSV to get a file that an import form, a database or a script can read.
The first line is treated as the header. Spaces around a column name are trimmed, an empty name becomes column_N, numbered by its position, and a repeated name gets its position added, so every column of the CSV has a unique name.
Need tabs again?
The CSV to TSV converter reads quoted CSV fields and writes them back with tabs, ready to paste into a sheet.
TSV to CSV questions
Click Open file and pick the .tsv, .tab or .txt file, or drop it on the input window. It is read in your browser and converted straight away; Download saves the result as a .csv file.
Yes. A value like 00412 is copied into the CSV as it is. Excel may still drop the zeros when it opens the CSV; importing the column as text keeps them.
A cell that starts with a double quote is read as a quoted field, the way spreadsheets copy a cell with a line break, and its quotes are removed. Quotes in the middle of a cell are kept and doubled in the CSV.
Columns are taken from the header line. A cell past the last header column has no name, so it is left out; add a header for it and convert again.
No. Converting runs in your browser, and an opened file is read there too.