Shard Tools

TSV to CSV

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

Maintained by Roshan.

Use TSV to CSV

Converts TSV into CSV 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 TSV to CSV

Converting the other way - tabs to commas - has the opposite risk profile, and it is the more dangerous direction. Going from CSV to TSV, the worry is a comma hiding inside a field. Going from TSV to CSV, the worry is that fields which needed no protection at all suddenly do: any value containing a comma was perfectly safe in a tab-separated file and becomes ambiguous the moment commas are the separator. Since text is full of commas - addresses, descriptions, anything written in sentences - this affects far more rows than the reverse conversion does. The work is therefore mostly about quoting: recognising which fields now need it and applying the escaping correctly rather than hoping the destination is forgiving.

Work through the input

  1. The file is parsed with tabs as the separator, respecting quoted fields in case the source used them.
  2. Each field is examined on output, and quoted only if it contains a comma, a double quote or a newline. Everything else is written bare.
  3. A field containing a double quote has it doubled inside the surrounding quotes, which is the CSV escaping convention.
  4. Line endings are normalised and a byte-order mark removed, since tab-separated exports come from a wide variety of tools.
  5. Empty fields and the row structure are preserved exactly, so a row with a trailing empty column keeps it.

When tsv to csv is useful

Sharing data with someone using a spreadsheet

CSV is more widely recognised by default. Expect more quoted fields than the original had, which is correct rather than a problem.

Preparing a file for an importer that wants CSV

The quoting is applied where needed, so descriptive text containing commas survives the trip intact.

Check the output

Questions about TSV to CSV

Why are there suddenly so many quotes?

Because commas are common in text. Any field containing one must be quoted now that commas separate the columns.

Is quoting added to every field?

No, only where required. Adding it everywhere would be valid but harder to read.

What if my TSV had unquoted tabs inside values?

Those fields were already ambiguous in the source and cannot be reliably recovered.

Will it open correctly in Excel?

Usually, though regional settings affect which separator Excel expects. Use the CSV to XLSX converter to avoid the question entirely.

Does the file leave my device?

No. The conversion runs in this tab.

Related tools

CSV to TSV

Convert CSV to tab-separated values in your browser. Parses quoted fields properly rather than replacing commas.

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.

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.