Skip to content
TypeParser
All tools

TSV to CSV

Convert TSV (tab-separated) to CSV.

beats convertcsv.com edge: Bidirectional + quote-aware
tsv
csv
Guide

About TSV to CSV

Convert TSV (tab-separated values) to CSV (comma-separated) and back. Fields that contain the new delimiter are re-quoted. Useful when copying from a spreadsheet (which puts tabs between cells), pasting into a tool that expects commas, or vice versa.

Why this exists

Spreadsheets put tabs between cells when you copy. Most data tools want commas. The conversion is so common it deserves a dedicated tool — one paste, one click, done.

What the tool does

  • Splits on the source delimiter (tab or comma)
  • Handles RFC 4180 quoting on either side
  • Re-quotes fields containing the new delimiter
  • Preserves cell content byte-for-byte
  • Auto-detects direction by sniffing the first line

Common workflows

Paste from Sheets into a CSV-only tool. Copy the cell range, paste into the input, hit convert. CSV out.

Round-trip via clipboard. Sheets → CSV import → edit → CSV → paste back into Sheets (Sheets handles the de-quoting).

Bridge between data tools. A Postgres client outputs TSV; your downstream tool wants CSV.

Pipe through a Markdown converter. TSV → CSV → CSV to Markdown → paste in docs.

How to convert TSV to CSV in code

The one-line shortcut tr '\t' ',' < in.tsv > out.csv works only when no field contains a comma. For safe, quote-aware conversion:

import pandas as pd
pd.read_csv("in.tsv", sep="\t").to_csv("out.csv", index=False)   # pandas
csvformat -T in.tsv > out.csv     # csvkit: TSV in, CSV out, quoting handled

Reverse (CSV → TSV) is pd.read_csv("in.csv").to_csv("out.tsv", sep="\t", index=False). The catch either way is quoting and embedded delimiters — the part this tool handles automatically while auto-detecting which direction you need.

Why a one-trick tool

Single-purpose, one-paste, no setup. The conversion is too common to deserve a CLI script and too simple to justify a full data tool. Open the page, do the swap, close the tab.

Frequently asked questions

Why is TSV more common than I'd expect?
Copying from Excel, Sheets, or a database client puts tabs between cells (because tab is uncommon in field values). TSV is the de facto clipboard format for tabular data on most platforms.
How is re-quoting handled?
Going TSV → CSV: any field containing a comma is wrapped in double quotes; embedded quotes are doubled. Going CSV → TSV: most fields don't need quoting (tab is rare in content), so we strip RFC 4180 quoting where safe.
Are line endings preserved?
Output uses LF by default. Toggle CRLF for Windows-friendly Excel imports.
What if my TSV has no header?
No-op as far as the tool is concerned — it does not need to know which row is the header. Both inputs round-trip cleanly.
Multi-line cells?
RFC 4180 quoting handles multi-line fields in CSV. TSV generally does not — newlines within cells break the row. The tool flags any cell with embedded newlines.
Dates and locales?
Untouched. The tool only changes the delimiter; cell content passes through byte-for-byte.
How do I convert TSV to CSV in Python or pandas?
pandas: pandas.read_csv("in.tsv", sep="\t").to_csv("out.csv", index=False). stdlib: read with csv.reader(f, delimiter="\t") and write with a comma csv.writer — this preserves RFC 4180 quoting for fields that contain commas. This tool does the same, plus auto-detects direction, without a Python install.
How do I convert TSV to CSV in Bash or Excel?
Bash: for simple data, tr '\t' ',' < in.tsv > out.csv — but this breaks if any field contains a comma, so prefer csvformat -T (csvkit) for safety. Excel: open the TSV, then Save As → CSV (Comma delimited); the tool here skips the round-trip and re-quotes comma-bearing fields automatically.

Related tools

Last updated: 2026-07-04