Skip to content
cliplimeClipLime

Convert TSV to CSV

Paste tab separated text or drop a file and get CSV, with commas, quotes and line breaks handled for you.

Runs on your device, nothing is uploaded

Convert from

to

Paste, type, drop a file here or load one.

0 characters, 0 lines

Options

When off, columns are called column1, column2 and so on.

More options

Helps Excel show accents and symbols correctly.

Puts an apostrophe before text that starts with = + - or @.

At a glance

Input
Tab separated text pasted from a spreadsheet, or a .tsv, .tab or .txt file. The input is always split at tabs.
Values
Every value is copied as written. Nothing is turned into a number, so 007 and 1.50 stay exactly as they are.
Quoting
A value is put in quotes in the CSV only when it needs them: when it holds a comma, a quote mark, a line break or a space at either end.
Delimiter
Write a comma, semicolon or pipe. A semicolon is what Excel expects in many European countries.
Quotes in TSV
A tab or a line break inside a cell survives when the cell is wrapped in double quotes. Backslash codes such as \t and \n are not decoded.
Options
LF or CRLF line endings, quotes around every value, a byte order mark for Excel, and protection against text that starts with = + - or @.
Privacy
Your data is converted in your browser tab and never uploaded.

How to do it

  1. 1

    Add your TSV

    Paste tab separated text, for example cells copied from Excel or Google Sheets, or drop a file on the box. You can also press Load a file.

  2. 2

    Check the input

    If the page says the text looks like CSV, it has commas where it should have tabs. Switch the input format as it suggests. Turn off First row has the column names if there is no header.

  3. 3

    Choose the CSV style

    Pick the Delimiter in the output. Under More options you can set the line ending, quote every value or add a byte order mark.

  4. 4

    Copy or download

    Copy the CSV or download a .csv file. The summary under the result shows how many rows and columns were read, so you can see at once if something is off.

TSV and CSV: what really differs

Both formats are rows of text split into columns. The one visible difference is the character between columns: a tab in TSV and a comma in CSV. The practical difference is quoting.

  • CSV needs quotes often. Commas are common in names, addresses and sentences, so a CSV value that holds a comma is wrapped in double quotes, and quote marks inside it are doubled.
  • TSV rarely needs quotes. A tab hardly ever appears in text, so most TSV files have no quoting at all. The simplest TSV cannot hold a tab or a line break inside a value. Some programs allow it by quoting the cell the way CSV does, others use backslash codes.
  • Spreadsheets speak TSV. Cells copied from Excel or Google Sheets reach the clipboard as tab separated text. That is why pasting a selection into a text box here just works.

Going from TSV to CSV, the converter reads the TSV, then writes each value again for CSV, adding quotes wherever a comma, a quote, a line break or a space at the edge would otherwise break the file.

What happens to quotes, tabs and backslashes

The converter reads quotes the CSV way. A cell wrapped in double quotes may contain tabs and line breaks, and two quote marks in a row stand for one. A quote mark in the middle of an unquoted cell, as in 5" pipe, is kept as it is.

Backslash codes are not decoded. Database exports such as PostgreSQL's COPY text format and MySQL's default output write a tab inside a value as \t, a line break as \n and an empty value as \N. Here those stay as the characters you see, so \N is not turned into an empty cell. Replace them first if your data uses them.

Rows that are shorter than the header are filled with empty cells. A row with extra values gets extra columns called column4, column5 and so on, and a repeated header such as name, name becomes name and name_2. A note under the result lists every repair.

Choosing the CSV delimiter and encoding

A comma is the standard CSV delimiter, and every tool understands it. Excel is the exception: it uses the list separator of your regional settings, which is a semicolon in many European countries, so a comma CSV can land in a single column there. Choose Semicolon under Delimiter in the output for those files. A pipe is a good choice when your text holds many commas and semicolons.

The CSV is written as UTF-8. Excel for Windows often reads a CSV as Windows-1252 unless the file starts with a byte order mark, so turn on Add a byte order mark under More options if accents look wrong in Excel. Some programs dislike the mark, so leave it off for those. Input files in UTF-8, UTF-16 or Windows-1252 are read correctly.

Questions people ask

How do I convert a TSV to CSV?

Paste the tab separated text or drop the file here, leave the output delimiter on Comma and press Copy or Download. In Excel you would open the file through Data, From Text, choose Tab as the delimiter, and then save as CSV.

Will commas inside my values break the CSV?

No. Any value with a comma is wrapped in double quotes, and quote marks inside it are doubled, so every CSV reader sees the same columns.

What happens to a tab or a line break inside a cell?

If the cell was wrapped in double quotes in the TSV, it is read as one cell and written to the CSV in quotes, with the tab or line break inside. A tab that is not in quotes is a column break, because that is what a tab means in TSV.

Why does \t or \N stay in my data?

Backslash codes are a convention of some database exports, and the converter does not decode them, because in other files a backslash is just a backslash. Replace them in a text editor first if you need real tabs, line breaks or empty values.

Why is everything in one column?

The text has no tabs. It may be comma or semicolon separated, or the spaces between columns may be spaces and not tabs. The page suggests CSV when it recognises commas. Spaces cannot be split safely, because they also appear inside values.

Is my data uploaded?

No. Pasted text and dropped files are read and rewritten in your browser tab, so private data stays on your device.