Home › File & PDF Tools › TSV to CSV Converter

TSV to CSV Converter

Our free TSV to CSV converter turns tab-separated data into comma-separated data right in your browser. Paste your TSV text below, or upload a .tsv or .txt file, and get a clean CSV file you can open in any spreadsheet program. Pick the output delimiter, control how fields are quoted, and mark the header row. Nothing is uploaded — your data never leaves your device.

Drop a .tsv or .txt file here, or click to choose one Tab-separated files only — up to 10 MB. Nothing is uploaded.

No file chosen yet — or paste your TSV text below.

Comma is the standard CSV choice.

Fields with a delimiter, quote, or line break need quotes.

How it works

A TSV file is a plain-text table. Each line is one row, and a tab character separates the fields inside that row. A CSV file is the same idea, but a comma separates the fields instead. Converting between them sounds like a simple find-and-replace — swap every tab for a comma — but real data is messier than that, and a plain swap breaks it. This converter parses the TSV properly first, then writes the CSV out cleanly.

The first thing the parser handles is quoted fields. A field wrapped in double quotes may contain a tab, a line break, or a quote mark of its own, and none of those should end the field. For example, an address like "12 Main Street, Apt 4" holds a comma inside the quotes, and a notes field may run over two lines inside one pair of quotes. The parser reads character by character, tracking whether it is inside a quoted field, so tabs and line breaks inside quotes stay part of the field. A quote mark inside a quoted field is written as two quote marks in a row, which the parser turns back into a single quote.

The second problem is rows with uneven column counts. Real exports often have them: a missing value at the end of a row, an extra column in one row, or a stray tab. The converter finds the longest row, pads every shorter row with empty fields so the table becomes a tidy rectangle, and warns you about each row it padded. Longer rows are kept as they are, and the column count grows to match, so a spreadsheet opens the result without shifting your data sideways.

When the CSV is written out, three choices matter. The delimiter is the character between fields: a comma is standard, a semicolon suits data that uses commas as decimal separators, a pipe suits text full of commas and semicolons, and tab keeps the output as TSV if you only want the quoting fixed or the rows evened out. Quote handling decides which fields get wrapped in double quotes. "Quote only when needed" is the default: a field is quoted only if it contains the delimiter, a quote mark, a line break, or a leading or trailing space. "Always quote" wraps every field, which some strict import tools prefer. "Never quote" writes fields bare, and the tool warns you if a field actually contains the delimiter, because that would split the field on import.

TSV row: field → field → field  →  CSV row: field , field , field (quoted when the field contains the delimiter, a quote, or a line break)

The header toggle tells the tool that the first row holds column names rather than data. It does not change the output text, but it changes the preview table, which shows the first row as a bold header, and the row count, which counts data rows separately from the header. The "trim spaces" option removes leading and trailing spaces from every field. Everything runs in your browser with FileReader and plain JavaScript, so a file of several thousand rows converts instantly and your data never leaves your device.

Worked example

Suppose you copied this small table out of a spreadsheet that exported it as TSV:

Name	Age
Alice	30
Bob	25

Step 1: paste those three lines into the input box, or click "Load example" to fill them in for you. The tool sees 3 rows and 2 columns.
Step 2: leave the delimiter on "Comma (,)" and quote handling on "Quote only when needed", and click Convert to CSV.
Step 3: the output is exactly this:

Name,Age
Alice,30
Bob,25

The page reports 3 rows and 2 columns, and the preview table shows Name and Age as the header row. Now try a trickier row: paste "Lee, Ann" 28 — a name with a comma inside quotes — and convert again. The output is "Lee, Ann",28: the quotes are kept because the field contains a comma, so a spreadsheet still reads it as one field. Finally, paste a short row, such as Sam with no age. The converter pads it to two columns, outputs Sam,, and warns you that row 4 had 1 column and was padded to 2. Switch the delimiter to semicolon and the same data becomes Name;Age, Alice;30, Bob;25 — handy when your spreadsheet uses commas as decimal separators.

FAQ

What is the difference between TSV and CSV?

TSV and CSV hold the same kind of data — rows of fields in a table — but they separate the fields differently. TSV uses a tab character between fields, while CSV uses a comma. TSV is common in exports from spreadsheets and databases because tabs rarely appear inside ordinary text, so the data needs less quoting. CSV is the format most tools expect on import, so converting TSV to CSV is usually the last step before opening the data somewhere else.

Is my data uploaded anywhere?

No. Everything you paste or upload is processed entirely in your browser. The file is read with your browser's FileReader, the conversion runs in local JavaScript, and nothing is sent to a server. Your tables stay on your own device, so you can safely convert private lists, customer records, or work data.

What happens if some rows have fewer columns than others?

Short rows are padded with empty fields so every row ends up with the same number of columns, and the tool warns you about each row it padded. A row with extra fields is kept as it is, and the column count grows to match the longest row. This keeps the output a tidy rectangle that spreadsheets can open without shifting your data sideways.

Which delimiter should I choose for the output?

Use a comma in most cases, because that is what spreadsheet programs and data tools expect from a CSV file. Choose a semicolon if your data uses commas as decimal separators, or if your fields contain a lot of commas. A pipe is a good choice when your text contains both commas and semicolons. Tab keeps the output as TSV, which is useful if you only need to clean up quoting or fix uneven rows.

Why would a field need quotes in the output?

A field needs quotes when it contains the delimiter, a quote mark, or a line break, because without quotes a program reading the file would mistake those characters for the end of the field or the end of the row. The default setting quotes only the fields that need it, which keeps the file clean. Always quoting every field is also safe and suits strict import tools, while never quoting is only safe when you know your data contains none of those characters.