How-toApril 30, 2026 · 5 min read

How to Convert Between CSV and TSV (Without Breaking It)

How to convert CSV to TSV and TSV to CSV safely by re-serializing through a real parser, with numbered steps and the right encoding and line-ending settings.


CSV and TSV are nearly the same format: a plain-text table with one row per line, fields split by a delimiter. CSV uses a comma, TSV uses a tab. That similarity makes converting between them sound trivial — just swap the separator, right? In practice, the naive swap is exactly what corrupts data. This guide shows the safe way to convert in both directions, and explains why re-serializing through a real parser is the only approach that keeps your fields intact.

Why a naive find/replace breaks your data

The obvious approach is to open the file in a text editor and replace every comma with a tab. It works on toy data and fails the moment a real value contains the delimiter.

Consider this CSV:

name,note
Ada,"Born in London, England"

There are two fields on the second row: Ada and Born in London, England. The comma inside the note is part of the value, not a separator — which is exactly why it sits inside quotes. A blind replace turns that line into:

name	note
Ada	"Born in London	 England"

Now the row has three fields instead of two. The note has been split in half, and the quoting that was supposed to protect it is left dangling. Anything downstream that reads this file will misalign every column from that point on.

The same trap exists going the other way. If a TSV value somehow contains a tab, or if your replace logic does not account for quoted fields, swapping tabs for commas produces the identical corruption. The lesson is that the delimiter is not just a character to find — it is a structural marker governed by quoting rules.

Why re-serializing through a parser is correct

A real CSV/TSV parser does not look for raw delimiter characters. It understands quoting: it knows that a comma inside quotes is data, and a comma outside quotes is a field boundary. When it reads Ada,"Born in London, England", it returns exactly two values, with the inner comma preserved as part of the second one.

Once the file is parsed into rows and columns in memory, writing it back out is a separate step called serialization. The serializer takes those clean values and joins them with whatever delimiter you choose, re-applying the quoting rules for that delimiter. If a value contains the new delimiter, it gets quoted; if it does not, it is written plainly.

This parse-then-serialize round trip is what makes conversion faithful. You are never editing the raw bytes between fields — you are reconstructing the file from its actual structure. CEESVEE works this way: it loads the file through its Rust parser, auto-detecting the delimiter and encoding, and the Save As dialog re-serializes the data with your chosen export delimiter. That is why a comma inside a value survives the trip to TSV and back.

Convert CSV to TSV

Here is the safe procedure using CEESVEE.

  1. Open your .csv file. The comma delimiter and the file's encoding are detected automatically, so the columns line up correctly on screen without any setup.
  2. Glance at the grid to confirm the data parsed as you expect — the right number of columns, no fields spilling sideways. This is your check that quoting was handled correctly.
  3. Open Save As.
  4. Set the export delimiter to tab. This is the change that turns CSV into TSV.
  5. Choose your encoding (UTF-8 is the safe default), your line endings (LF or CRLF), and whether to write a BOM. Match these to whatever tool will read the file next.
  6. Save with a .tsv extension.

The result is a genuine TSV: every value re-serialized with tabs between fields, and any value that contains a tab quoted according to the rules. Nothing was found-and-replaced.

Convert TSV to CSV

The reverse direction follows the same pattern.

  1. Open your .tsv (or .tab) file. The tab delimiter and encoding are auto-detected, so the file loads cleanly even though tabs are invisible on screen.
  2. Confirm the columns look right in the grid.
  3. Open Save As.
  4. Set the export delimiter to comma. This produces CSV.
  5. Pick the encoding, line endings, and BOM to match the destination. Many CSV consumers expect UTF-8; some Windows tools prefer CRLF line endings or a BOM.
  6. Save with a .csv extension.

Because CEESVEE re-serializes through its parser, any value containing a comma is automatically wrapped in quotes in the CSV output — the very thing a naive conversion gets wrong. Your addresses, names like "Doe, Jane," and free-text notes stay in one piece.

Choosing encoding, quoting, and line endings on export

The delimiter is the headline change, but a faithful conversion also depends on the settings around it. CEESVEE exposes these so the file you produce is exactly what the next tool expects:

Encoding

UTF-8 is the modern default and the safest choice for files with accented characters, symbols, or non-Latin text. If a destination system insists on a legacy encoding, set it explicitly so characters are not mangled. If your input arrived garbled, see fixing CSV encoding before you convert.

Quoting style

Quoting is what protects values that contain the delimiter. Letting the serializer apply quotes automatically is the right default — it quotes only what needs quoting. That is precisely the behavior a find/replace can never reproduce.

Line endings

Unix-style tools expect LF; many Windows tools expect CRLF. Picking the wrong one rarely breaks parsing but can produce stray characters or warnings downstream. If you are unsure, CSV line endings explained covers when to use each.

BOM

A byte-order mark helps some programs recognize UTF-8, but trips up others that read it as part of the first field. Control it deliberately rather than leaving it to chance.

Why this matters

Conversion done correctly is invisible — the data looks the same, just with a different separator. Conversion done by find/replace is a silent corruption that may not surface until a column misaligns three steps later in your pipeline. Parsing and re-serializing through a real tool removes that risk entirely, and it scales: CEESVEE handles a 1,000,000-row, 100 MB+ file in its Rust core with a virtualized grid, all 100% local — your file never leaves your machine.

For more on how the two formats compare, see CSV vs TSV and changing a CSV's delimiter. To inspect tab files safely before converting, opening TSV files walks through it.

Download CEESVEE to convert between CSV and TSV the safe way — free, open source (MIT), and entirely on your own machine. The source is on GitHub.

Frequently asked questions

How do I convert a CSV file to TSV?

Open the CSV in a tool that parses it properly, then re-save it with a tab as the export delimiter. In CEESVEE you open the file — the comma delimiter is auto-detected — and use Save As, choosing tab as the export delimiter to write a TSV.

Can I just replace commas with tabs to convert CSV to TSV?

No. A blind find/replace of commas with tabs corrupts any field that legitimately contains a comma, such as an address or a quoted note. You have to honor the quoting rules, which means parsing the CSV and re-serializing it rather than swapping characters.

Does converting CSV to TSV change my data?

It should not. A faithful conversion only swaps the delimiter and re-applies the format's rules. The values, rows, and columns stay identical. CEESVEE re-serializes through a real parser so the data round-trips intact.

What encoding and line endings should I use when exporting?

Match what the destination expects. UTF-8 is the safe default for encoding; pick LF for Unix-style tools and CRLF for Windows-style ones. CEESVEE lets you set encoding, line endings, quoting, and BOM in the Save As dialog.

Is CEESVEE's conversion done locally?

Yes. CEESVEE runs entirely on your machine — there is no upload and no cloud step. Your file never leaves your computer during the conversion.

Keep reading

All guides