---
title: "TSV to CSV"
description: "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."
url: https://findutils.com/convert/tsv-to-csv/
category: convert
---

# TSV to CSV

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 this tool:** [TSV to CSV](https://findutils.com/convert/tsv-to-csv/)

## Programmatic access

- REST id `tsv-to-csv`: POST https://api.findutils.com/api/tools/tsv-to-csv/execute (reference: https://findutils.com/api/tsv-to-csv/)
- MCP tool `tsv_to_csv` on https://mcp.findutils.com (reference: https://findutils.com/mcp/tsv-to-csv/)

## 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.

## 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.

## Related Tools

- [CSV Viewer](https://findutils.com/convert/csv-viewer/)
- [CSV to Excel](https://findutils.com/convert/csv-to-excel/)
- [JSON to CSV](https://findutils.com/convert/json-to-csv/)
- [CSV to NDJSON](https://findutils.com/convert/csv-to-ndjson/)
- [CSV to SQL](https://findutils.com/convert/csv-to-sql/)
- [CSV Column Extractor](https://findutils.com/convert/csv-column-extractor/)
- [CSV Merger](https://findutils.com/convert/csv-merger/)
