Format Code Now
/

TSV to CSV Converter

CV-13

Paste tab-separated text and get CSV, or switch to CSV to TSV to go the other way. Fields are quoted only where the format needs it, and values are never changed.

Runs in your browser. Nothing is uploaded.

TSV or CSV

Result

How to use it

  1. Paste your TSV or CSV into the input box, or open a file (up to 5 MB) or drop it on the box.
  2. Choose TSV to CSV or CSV to TSV. For CSV, pick the delimiter: comma, semicolon or pipe.
  3. Leave TSV fields may be quoted ticked for Excel-style exports, or untick it for plain TSV.
  4. Copy the result or download it. A downloaded CSV starts with a byte order mark so Excel reads UTF-8.

TSV to CSV

The text is split on tabs, and each field is written with your chosen CSV delimiter. A field is wrapped in double quotes only when it contains the delimiter, a quote, a tab, a line break, or space at either end, and quotes inside are doubled. By default a TSV field already wrapped in quotes is read the way Excel and Google Sheets export it, so a field can hold a tab or line break. Untick that option for plain TSV, where a quote is just a character.

CSV to TSV

The CSV is read with the delimiter you picked, following the CSV standard, and written with tabs. A field that holds a tab or a line break is wrapped in quotes, because TSV has no other way to hold it, so the program that reads the result must understand quotes. A field that starts with a quote is wrapped as well, so it is not misread. Blank lines are dropped, and rows keep their own number of fields, with nothing padded.

What it leaves alone

Values are never trimmed, converted or re-encoded, so leading zeros, long numbers and spaces inside fields stay as they were. This tool changes the format only. It does not detect delimiters for you in the CSV direction, so choose comma, semicolon or pipe to match your file. Everything runs in your browser, and large files are better handled by a command-line tool.

Error messages and what to do

MessageWhat it meansFix
A quoted field is never closed (missing closing ")A field starts with a double quote, but the text ends before the closing quote. This can also happen with TSV when a field simply begins with a quote character.Add the missing closing quote, double any quote that belongs inside the text, or untick TSV fields may be quoted.

Questions people ask

How do I convert TSV to CSV?

Paste the tab-separated text into the input box and choose TSV to CSV. Each tab becomes your chosen delimiter, and fields that need quoting are quoted. Copy the result or download it as a .csv file. Nothing is uploaded.

How do I convert CSV to TSV?

Choose CSV to TSV, pick the delimiter your CSV uses, and paste the CSV. Each field is written with tabs between them. A field that contains a tab or line break is wrapped in quotes, since TSV cannot hold those otherwise.

What does TSV fields may be quoted do?

When it is on, a TSV field wrapped in double quotes is read as Excel and Google Sheets write it, with "" for a quote and line breaks allowed inside. Turn it off for plain TSV, where a quote is just a character and is kept as it is.

Can I get a semicolon separated file?

Yes. Choose Semicolon under CSV delimiter, and the output uses semicolons, which many European versions of Excel expect. In CSV to TSV the same setting tells the converter which delimiter your CSV uses.

Why does the CSV download open correctly in Excel?

A downloaded CSV starts with a byte order mark, which tells Excel the file is UTF-8, so accents, emoji and non-Latin text show correctly. The copied text does not contain the mark, so pasting stays clean.

Are blank lines kept?

No, blank lines are dropped in both directions. Rows keep their own number of fields and nothing is padded, so a short row stays short. Values are not trimmed or changed.

About this tool

TSV to CSV splits on tabs and writes fields separated by your chosen delimiter, adding quotes where a field contains the delimiter, a quote, a line break, or space at either end. By default a TSV field wrapped in double quotes is read the way Excel writes it, with "" for a quote and line breaks allowed inside; turn that off for plain TSV where a quote is just a character. CSV to TSV reads standard CSV with the delimiter you pick, and writes tabs; a field that contains a tab or line break is wrapped in quotes, because TSV has no other way to hold it, so the next program must read quotes. Blank lines are dropped, and rows keep their own field counts (nothing is padded). Values are never trimmed or converted. A downloaded CSV starts with a byte order mark so Excel reads UTF-8 correctly.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.