Shard Tools

CSV to TSV

Convert CSV to tab-separated values in your browser.

Maintained by Roshan.

Use CSV to TSV

Converts CSV into TSV in this tab. Configuration files routinely hold hostnames, keys and credentials, so nothing here is sent anywhere.

Values are never retyped as numbers or booleansGuessing types is how a converter turns a postcode of 0123 into 123, or a literal string of false into a boolean. Values are carried across as they were written, and casting is left to you where it matters.

Explore developer and data tools

Find related browser-local tools for nearby tasks without starting another search.

Browse all developer and data tools

About CSV to TSV

The obvious way to convert CSV to TSV is to replace every comma with a tab, and it is wrong in precisely the cases that matter. A CSV field may contain a comma if it is quoted, which is the entire reason quoting exists, and a blind replacement turns that one field into two - corrupting exactly the rows that were complicated enough to need protecting. An address, a name with a title, a description with a list in it: those are the rows that break, and they break silently, shifting every subsequent column in that row. This converter parses the file properly, tracking whether it is inside a quoted field, so a comma in the data stays data. Tabs are worth converting to because a tab appears far less often in real text than a comma does.

Work through the input

  1. The file is parsed character by character, tracking whether the current position is inside a quoted field, so a comma within quotes is treated as content rather than a separator.
  2. Doubled quotes inside a quoted field are recognised as an escaped quote character and unescaped correctly.
  3. A byte-order mark is stripped and line endings are normalised, since CSV files travel between operating systems constantly.
  4. Fields are re-quoted on output only where necessary - when they contain a tab, a quote or a newline - which keeps the result readable.
  5. Row structure is preserved exactly, including empty fields and trailing empty columns, which matter to anything importing the file.

When csv to tsv is useful

Pasting data into a spreadsheet

Tab-separated text pastes directly into most spreadsheet applications and splits into columns automatically, which CSV text does not.

Feeding a tool that expects tabs

Many bioinformatics and data-processing tools default to TSV. Converting properly avoids the corrupted rows a naive replacement produces.

Check the output

Questions about CSV to TSV

Why not just replace the commas?

Because a quoted field may contain a comma, and replacing it splits one field into two. That corrupts exactly the rows that needed quoting.

Are quotes kept in the output?

Only where needed - if a field contains a tab, a quote or a newline. Otherwise the field is written bare.

What about semicolon-separated files?

This tool assumes commas. Use the CSV to JSON converter, which detects the delimiter automatically.

Will it handle newlines inside fields?

Yes. A quoted field spanning lines is parsed correctly and re-quoted on output.

Related tools

TSV to CSV

Convert tab-separated values to CSV in your browser, adding quotes only where the data needs them.

CSV to JSON Converter

Convert CSV to a JSON array locally. Parse quoted commas, embedded newlines, BOM files, duplicate headers, sparse rows, and optional safe value types.

CSV to XLSX

Turn CSV into a real .xlsx workbook in your browser. Leading zeros and long numbers survive, unlike opening the CSV in Excel directly.