About this tool
Convert between CSV and TSV and preview the table first. Handy for switching between pasting into spreadsheets (TSV) and importing into systems (CSV).
Typical uses
- Turn a table copied from Excel into CSV for import
- Convert CSV to TSV to paste back into a spreadsheet
- Check that delimiters are parsed correctly
How to use
Upload CSV/TSV or paste table text and select the input format.
Preview and convert, inspect the table, then download the output.
Input is limited to 5 MB. Preview shows up to 30 rows and 20 columns, while export processes all parsed rows.
Which cells gain or lose quotes
The page opens with a three-line name,score sample, and Preview and convert reports "Parsed 3 rows; preview shows up to 30 rows and 20 columns.". The order table below has trickier cells and is converted CSV → TSV. In the tables ⇥ is a tab, ⏎ an LF line break inside a cell, ↵ the CRLF between rows, ␣ a space and ∅ an empty value.
| CSV row | Parsed note value | TSV output row |
|---|---|---|
| 007,"Hello, world" | Hello, world | 007⇥Hello, world |
| 2,"line1⏎line2" | line1⏎line2 | 2⇥"line1⏎line2" |
| 3,"say ""hi""" | say "hi" | 3⇥"say ""hi""" |
| 4,=SUM(A1) | =SUM(A1) | 4⇥=SUM(A1) |
- "Hello, world" needs quotes in CSV because of the comma. TSV separates fields with tabs, so the comma is ordinary text and the quotes are dropped.
- A cell containing a line break is still quoted in the output. The LF inside the cell is kept as it was, while rows are separated by CRLF.
- A cell containing double quotes is quoted and each inner quote is doubled, the escaping rule RFC 4180 describes.
- Values are kept as text exactly: 007 stays 007 and =SUM(A1) is written unchanged, with no formula-protection prefix. To keep leading zeros and block formulas in Excel, use the CSV/TSV to XLSX tool instead.
Delimiters, blank lines and the final newline
The tool does not detect delimiters. It uses a comma or a tab according to the direction chosen in Input format, and the output always uses CRLF line endings. These are real conversions:
| Input | Direction | Rows parsed | Output | Note |
|---|---|---|---|---|
| id;name⏎1;Ada | CSV → TSV | 2 | id;name↵1;Ada | A semicolon is not a delimiter, so each row becomes one column |
| a,b⏎⏎c,d | CSV → TSV | 3 | a⇥b↵↵c⇥d | A blank line is kept as an empty row |
| a,b⏎c,d⏎ | CSV → TSV | 2 | a⇥b↵c⇥d↵ | One final newline only ends the last row and is not counted; the output also ends with CRLF |
| a,b⏎c,d⏎⏎ | CSV → TSV | 3 | a⇥b↵c⇥d↵↵ | A second final newline leaves one empty row |
| a,b,c⏎d | CSV → TSV | 2 | a⇥b⇥c↵d | Rows with different field counts are not an error and are written as they are |
| a⇥"b⇥c" | TSV → CSV | 1 | a,b⇥c | A tab inside a cell needs no quotes in CSV |
| x⇥ y ⏎1⇥2 | TSV → CSV | 2 | x," y "↵1,2 | Cells with leading or trailing spaces are quoted in CSV output; the spaces are kept |
| city⇥note⏎Paris⇥A, B | TSV → CSV | 2 | city,note↵Paris,"A, B" | A cell with a comma is quoted in CSV |
When a CSV cell itself contains a tab, the TSV output wraps that cell in quotes. The IANA registration for text/tab-separated-values does not allow tabs inside fields and puts each record on a single line, so programs that only read that strict form may split such a cell. For data like this, replace tabs and line breaks inside cells before converting.
Parse errors and file limits
Unbalanced quotes stop the conversion and no partial result is produced. The status line shows the first error and the record number, counted from 1:
| Input | Result | Note |
|---|---|---|
| a,"b⏎c | Parse failed: Quoted field unterminated (1) | A quote opens and is never closed before the end of the text |
| "a"b,c | Parse failed: Trailing quote on quoted field is malformed (1) | Other characters follow a closing quote. A second error is also found, but only the first is shown |
| a⇥b⏎"x | Parse failed: Quoted field unterminated (2) | The error is in record 2 |
| a,b"c | a⇥"b""c" | A quote in the middle of an unquoted field passes; the output quotes the whole cell and doubles the quote |
| Message | When it appears |
|---|---|
| Input exceeds 5 MB. | Pasted or edited text exceeds 5 MB as UTF-8 (5 × 1024 × 1024 bytes) |
| File exceeds 5 MB. | An uploaded file exceeds 5 MB |
| File must use UTF-8 encoding. | An uploaded file is not valid UTF-8, for example a GBK or Windows-1252 export |
A BOM at the start of an uploaded file is removed. A file name ending in .tsv switches the direction to TSV → CSV; any other file is treated as CSV → TSV. Download saves converted.tsv or converted.csv. Editing the text or switching direction clears the old result, so convert again.
Sources
Frequently asked questions
Why does the preview show only part of the data?
The preview shows up to 30 rows and 20 columns; export processes every parsed row.
File size limit?
Input up to 5 MB.
What if I need Excel?
Use the CSV/TSV to XLSX tool, which preserves leading zeros and long IDs.
Suggest an improvement to this tool
Missing an option, something awkward to use, or a wrong result? Let us know.