Skip to content

TSV to CSV Converter

Convert TSV to CSV in your browser. Values with commas or quotes are auto-escaped per RFC 4180.

    Runs entirely in your browser. Nothing is uploaded.

    This tool converts TSV (tab-separated values) to CSV (comma-separated values) in your browser; nothing leaves your machine. For the inverse direction, see CSV to TSV.

    The basic conversion

    For data without special characters, TSV-to-CSV is a tab-to-comma replacement:

    TSV: name<TAB>age<TAB>city
         Alice<TAB>30<TAB>NYC
    
    CSV: name,age,city
         Alice,30,NYC
    

    The harder part is handling cells that contain commas, quotes, or newlines.

    Cells that need quoting in CSV

    CSV (RFC 4180) requires quoting when a cell contains:

    • A comma (,)
    • A double quote (")
    • A newline (\n) or carriage return (\r)

    In TSV, none of these are problematic — tabs are the only delimiter, and TSV doesn’t typically allow tabs inside cells. So a TSV cell can contain any of , " \n literally; converting to CSV requires wrapping such cells in double quotes.

    TSV cell: NYC, NY
    CSV cell: "NYC, NY"
    
    TSV cell: She said "hi"
    CSV cell: "She said ""hi"""    ← quote chars doubled
    
    TSV cell: line one
              line two              ← TSV with multi-line cell (uncommon but possible)
    CSV cell: "line one
              line two"              ← wrapped in quotes
    

    The tool above handles all three cases.

    Tabs inside cells

    Standard TSV forbids tabs inside cells (no escape mechanism), but some non-standard TSV files include them. Converting to CSV is a chance to fix this — the tab character has no special meaning in CSV, so embedded tabs become literal text inside the cell.

    Non-standard TSV cell: foo<TAB>bar (embedded tab)
    CSV cell:              foo<TAB>bar (literal tab character — preserved)
    

    The CSV is technically valid (a literal tab in a cell is fine), but consumers may not expect it. Some workflows strip or replace embedded tabs as part of the conversion; the tool above has no such option, so do a find-and-replace afterwards if you need to.

    Encoding

    TSV is encoding-agnostic; UTF-8 is the modern default. CSV likewise. The tool above reads the input as UTF-8 and writes UTF-8.

    For Excel-compatibility on legacy Windows systems, prepending a UTF-8 BOM helps Excel detect encoding correctly. The tool doesn’t add one; in older Excel, import through Data → From Text/CSV and choose UTF-8.

    Header row

    Both TSV and CSV typically have a header row as the first line. Conversion preserves it as-is — no special handling needed.

    For headerless data, the conversion is the same; the consumer just doesn’t get column names.

    Line endings

    TSV file: line1<TAB>value1\r\n      ← Windows CRLF
              line2<TAB>value2\r\n
    
    CSV file: line1,value1\r\n           ← preserved
              line2,value2\r\n
    
    or
    
    CSV file: line1,value1\n              ← normalized to Unix LF
              line2,value2\n
    

    The tool above accepts \n or \r\n in the input and always writes \n.

    When to use TSV vs CSV

    ScenarioTSVCSV
    Spreadsheet copy-pasteDefaultSometimes
    File export from spreadsheetSometimesDefault
    BioinformaticsStandard (BED, GFF, VCF)Less common
    Web API CSV downloadsRareStandard
    Unix shell pipelinesEasier (no quote state)Harder
    Data with internal commasEasierStandard handling
    Data with internal newlinesTSV doesn’t natively supportRFC 4180 quoting

    TSV is the right format when piping through Unix tools (cut, awk, sort, join); CSV is the right format for files exchanged with anything that expects RFC 4180.

    Common pitfalls

    • Forgetting to quote cells with commas. A naive replace-tab-with-comma breaks every cell containing a comma. The tool above handles this; manual conversion needs care.
    • Forgetting to escape internal quotes. A cell containing " becomes "" inside CSV quotes. Single internal " makes the parser think the cell ended.
    • Internal tabs in TSV becoming literal text in CSV. Usually fine; sometimes confusing for downstream consumers expecting tab-free cells.
    • Locale issues. Excel in some locales (Germany, France) expects ; as the CSV delimiter. The tool above always uses ,; switch to TSV → SCSV (semicolon-separated) or handle locale-specific conversion downstream.
    • Trailing newlines. A TSV file ending without \n makes some parsers see the last row as incomplete. Most tolerate it; the tool’s output never ends with a newline.
    • BOM bytes at the start. A UTF-8 BOM in the input shows up in the first cell of the first row as invisible characters. Strip BOMs before parsing or detect-and-skip explicitly.

    For the inverse direction, see CSV to TSV. For other CSV conversions, CSV to JSON, CSV to Markdown table.