Skip to content

Convert

TSV to CSV

TSV to CSV

Beta

Convert tab-separated exports from psql, mysql and Excel into RFC 4180 CSV, and CSV back into TSV, in your browser. Quoting is correct, values stay text, and nothing is uploaded.

Use via API
  • Free, no sign-up
  • REST + MCP
  • Updated
  • Reviewed by Olgun Ozoktas

Converted in your browser. We do not upload the file. Quoting follows RFC 4180. Values stay text; 00123 is not turned into a number.

TSV (tab-separated)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
CSV

The quoted CSV will appear here..

Why Use Our TSV to CSV Converter?

psql, mysql --batch, Excel's Text (Tab delimited) export and a copy from a spreadsheet grid all produce tab-separated text. Many upload forms and importers accept only CSV. Replacing every tab with a comma looks like the fix, and it breaks the first value that contains a comma, a quote or a line break. This page reads the TSV, including the fields Excel wrapped in quotes, and writes CSV with the RFC 4180 rule: a cell is quoted only when it needs to be, and a quote inside is doubled. The reverse direction writes TSV from CSV on the same page. Values stay text, so a part number keeps its leading zeros. Nothing is uploaded.

Tab-separated values is the plainest table format there is: one record per line, one tab between fields, and, in the strict form, no tabs or line breaks inside a field. psql and mysql --batch write it, Excel offers it as Text (Tab delimited), Google Sheets exports it as .tsv, and a copy from any spreadsheet grid pastes it. CSV is the format the rest of the world accepts, and its one hard rule is quoting: a field that holds the separator, a quote or a line break must be wrapped in quotes, with each inner quote doubled. That rule is RFC 4180, and this page applies it.

TSV to CSV reads the text, including a field that Excel wrapped in quotes because it held a tab, and writes CSV with a comma or a semicolon as the separator. A leading byte order mark is dropped, CRLF line ends are accepted, and blank lines are skipped. CSV to TSV reads a CSV per RFC 4180, detecting the separator from the first line, and joins the cells with tabs; a cell that holds a tab, a quote or a line break is quoted the way Excel's export quotes it, and every other cell is bare. The status line counts the rows and columns and warns when rows have a different width than the header.

Values stay text in both directions. A part number keeps its leading zeros, a long id keeps every digit, and a date is not reformatted. The Excel BOM toggle adds a UTF-8 byte order mark to the download for Excel on Windows. The input cap is 5 MB for TSV and 10 MB for CSV. Nothing is uploaded; the file is converted in your browser.

How it compares

Excel can open a tab-delimited file and save it as CSV, but that round trip reformats dates and drops leading zeros unless every column is set to text first. A find-and-replace of tabs with commas breaks on the first value with a comma in it. This page applies the one quoting rule, changes no value, and keeps the file in the tab.

TSV and CSV Tips

  • A cell is quoted only when it holds the separator, a quote or a line break. Every other cell is written bare, so the CSV stays readable.
  • Excel wraps a tab-delimited field in quotes when it holds a tab, a quote or a line break. The page reads such a field as one value. A quote inside a bare field, as in 5" pipe, is a literal character.
  • Values are never changed. 00123 keeps its zeros, 1e5 stays text, and a date is not reformatted. The spreadsheet decides the type when it opens the file.
  • A row with a different number of columns than the header usually has a stray tab or a line break inside a value. The count in the status line finds it; the row still converts.
  • mysql --batch writes a tab or a newline inside a value as the two characters backslash and t or backslash and n. The page does not unescape those; they stay as written.

Frequently Asked Questions

Why not replace every tab with a comma?

Because a value can contain a comma. Pipe, 5 inch becomes two cells and every column after it shifts by one. A value with a quote or a line break breaks the file in the same way. The CSV rule is to wrap such a value in quotes and double the inner quotes, and that is what this page does.

Does the page also convert CSV to TSV?

Yes. Flip the direction toggle, or drop a .csv file and the page switches by itself. The CSV is read per RFC 4180, so a quoted comma stays inside its value, and the cells are joined with tabs. A cell that holds a tab, a quote or a line break is quoted the way Excel's tab-delimited export quotes it. /convert/csv-to-tsv/ leads to this page.

Are values changed in any way?

No. Every value is written as text exactly as it was read. 00123 keeps its zeros, 1e5 is not turned into 100000, and 03/04/2026 is not reformatted. Only the quoting changes, and only where the separator, a quote or a line break makes it necessary.

How does the page read a TSV that Excel exported with quotes?

Excel's Text (Tab delimited) export wraps a field in quotes when the field holds a tab, a quote or a line break, and doubles the inner quotes. The page reads such a field as one value. A quote that appears inside a field that does not start with a quote, as in 5" pipe, is kept as a literal character.

What does the uneven rows warning mean?

Some rows have a different number of columns than the header. In a TSV that usually means a stray tab or a line break inside a value that was not quoted, or a trailing tab on some rows. The rows still convert; the count tells you how many to check in the source.

Which separator should I pick for Excel?

Excel follows the Windows regional settings. In a locale that uses a comma as the decimal mark, Excel expects semicolons between fields; pick Semicolon. Everywhere else pick Comma. Turn on Excel BOM if accented characters show wrongly; Google Sheets and Numbers do not need it.

Does the page unescape mysql --batch output?

No. mysql --batch writes a tab inside a value as the two characters backslash and t, and a newline as backslash and n. The page keeps them as written, because it cannot know whether a backslash in your data was an escape or a literal. Convert with --raw off in mysql if you need the characters back.

Is my file uploaded anywhere?

No. The text is parsed and rewritten in your browser, and no request carries the file. You can confirm that in the browser's network panel while converting.

How large a file can I convert?

The input cap is 5 MB for TSV and 10 MB for CSV. The conversion runs in the tab, so a file near the cap can keep the browser busy for a moment. Use Download rather than Copy for a large output. For a batch or a script, the same converters are on the FindUtils API as tsv_to_csv and csv_to_tsv.

How do I get JSON from the result?

Use CSV to NDJSON for one JSON object per line, or the JSON CSV Converter for a JSON array. Both read the CSV this page writes. CSV to SQL turns the same rows into INSERT statements.

Rate This Tool

0/1000

Get Weekly Tools

Suggest a Tool