Overview
Introduction
Pasting a range out of a spreadsheet, or exporting from a command-line tool, often produces tab-delimited (TSV) text, but most downstream tools expect standard comma-delimited CSV. This tool converts TSV to CSV without a spreadsheet program.
It parses tabs as the delimiter using the same quoting rules RFC 4180 defines for commas, so quoted fields with embedded tabs or newlines convert correctly.
What Is TSV to CSV Converter?
A delimiter-conversion tool that re-parses tab-separated values and re-serializes the same rows and columns using commas as the field separator instead.
Row and column structure is preserved exactly; only the delimiter character between fields changes.
How TSV to CSV Converter Works
The input is scanned character by character, tracking whether the parser is inside a quoted field so that tabs and newlines inside quotes aren't treated as boundaries.
Once the raw grid of cells is extracted, each row is re-joined with commas, and any cell containing a comma, quote, or newline is wrapped in double quotes in the output.
When To Use TSV to CSV Converter
Use it right after pasting a range from Excel or Google Sheets into a plain-text editor, to get standard CSV for an API request or import.
It's also useful when a command-line tool's default tab-delimited output needs to become CSV for a downstream system that only accepts commas.
Often used alongside CSV to TSV Converter, CSV Delimiter Changer and SSV to CSV Converter.
Features
Advantages
- Correctly handles quoted fields containing tabs, commas, or newlines before re-emitting as CSV.
- Preserves row and column structure exactly, with no data loss or reordering.
- Runs entirely client-side, so pasted spreadsheet data never leaves your browser.
Limitations
- Assumes the input is tab-delimited; comma-, semicolon-, or pipe-delimited input should go through the matching converter instead.
- A field that already contains a comma will come back quoted in the CSV output, which is correct but can look surprising if you weren't expecting it.
Examples
Best Practices & Notes
Best Practices
- If the pasted TSV looks like it collapsed onto one line, check that your source actually used tab characters and not multiple spaces.
- Verify quoted fields containing commas look right in the CSV output, since that's the main structural change this conversion introduces.
- Pair with CSV to TSV to confirm a round trip reproduces your original data.
Developer Notes
The conversion re-uses the shared CSV grid parser twice: parse with `\t` as the delimiter into an array of string arrays, then re-stringify the same grid with `,` as the delimiter. Both steps share the same RFC 4180-aware escaping logic, so quoting stays consistent in either direction.
TSV to CSV Converter Use Cases
- Turning a pasted spreadsheet range into CSV for an API request body or script
- Converting `cut`/`awk` tab-delimited command output into CSV for a database import
- Normalizing mixed tab- and comma-delimited exports into one consistent CSV format
Common Mistakes
- Assuming this also fixes character encoding or line-ending differences; it only changes the delimiter character.
- Feeding comma- or pipe-delimited data into this tool expecting auto-detection; it always parses with a tab delimiter.
Tips
- If a column looks merged after conversion, the source likely used spaces instead of a real tab character between fields.
- Use CSV to TSV afterward on the result to sanity-check the round trip.