· 4 min read
How to Convert Tab-Separated Data to CSV
Heshan Fernando
Co-founder & COO
You copied a range of cells out of a spreadsheet, and when pasted as plain text, it comes out tab-separated rather than comma-separated — which is exactly what a spreadsheet’s clipboard format typically produces, but not what a tool expecting CSV input wants. TSV and CSV represent the exact same kind of tabular data, just delimited differently, and the mismatch is a common, easily fixed source of “why won’t this import correctly” frustration.
Converting between the two seems like it should be a trivial find-and-replace of tabs for commas, but doing it correctly means handling a detail that a naive replace gets wrong: fields that themselves contain a comma need to be quoted in the resulting CSV, or the output becomes ambiguous.
What converting TSV to CSV actually involves
TSV (tab-separated values) and CSV (comma-separated values) both represent tabular data as plain text, one row per line, with fields separated by a specific delimiter — a tab character for TSV, a comma for CSV. Converting means replacing that delimiter, but a correct conversion also needs to properly quote any field that itself contains a comma (since an unquoted comma inside a field would be misread as a new field boundary in the resulting CSV) and handle any existing quote characters within fields correctly.
This is exactly why a naive “replace every tab with a comma” approach can silently produce broken CSV — if a field happens to contain a comma (a product description, a full name written as “Last, First”), that comma needs to be distinguished from the delimiter through proper quoting, which a blind character replacement doesn’t do.
Why people get stuck here
- Spreadsheet clipboard data defaults to tab-separated. Copying a range of cells and pasting as plain text produces TSV by default in most spreadsheet applications, which surprises people expecting comma-separated output.
- A simple find-and-replace doesn’t handle embedded commas correctly. Blindly swapping tabs for commas breaks the moment any field’s actual content contains a comma.
- Tools that expect CSV specifically reject TSV input. Many import tools and APIs are strict about delimiter format, requiring an actual conversion rather than accepting either format interchangeably.
- Manual conversion for large datasets isn’t practical. Doing this row by row for anything beyond a handful of lines isn’t a reasonable manual task.
What a good TSV to CSV converter looks like
Properly quotes fields containing commas
The core correctness requirement — any field with an embedded comma needs quoting in the output, or the resulting CSV will misparse.
Handles existing quote characters correctly
Fields that already contain quote characters need those escaped properly in the CSV output, following standard CSV quoting conventions.
Works instantly from pasted or uploaded data
Whether you’re pasting a spreadsheet clipboard copy directly or uploading a .tsv file, the conversion should be immediate.
Common mistakes to avoid
- Doing a naive tab-to-comma find-and-replace without accounting for fields that already contain commas, producing broken CSV output.
- Not checking whether your source data has any embedded quote characters that also need proper escaping in the conversion.
- Assuming every “CSV” tool actually rejects TSV — some are more permissive than others, so check before assuming a conversion step is strictly necessary.
- Forgetting that copying from a spreadsheet as plain text produces TSV, not CSV, which explains an otherwise confusing paste result.
How to do it with the TSV to CSV Converter
Online Tool Store’s TSV to CSV Converter converts tab-separated data into properly quoted CSV entirely in your browser.
- Paste your tab-separated data, or upload a
.tsvfile. - Let the tool convert delimiters and apply correct quoting.
- Review the resulting CSV output.
- Copy or download the converted file.
Because the conversion runs locally, you can convert sensitive spreadsheet data without uploading it to an external server.
Frequently asked questions
Why did my spreadsheet paste come out tab-separated instead of comma-separated?
Most spreadsheet applications use tab as the default delimiter when copying cells to the clipboard as plain text — this is standard behavior, not an error, but it means a direct paste won’t be valid CSV without conversion if your destination specifically expects comma-separated data.
What happens if my data has commas inside a field?
A proper converter wraps that field in quotes in the resulting CSV, which is the standard way CSV distinguishes an embedded comma from an actual field-separating comma. A naive tab-to-comma replace, without this quoting logic, would incorrectly treat that embedded comma as a new field boundary.
Can I convert CSV back to TSV as well?
The same underlying logic works in reverse — swapping the delimiter and adjusting quoting as needed — though check whether your specific tool supports conversion in both directions or only one.
Final thought
TSV and CSV are the same underlying idea with a different delimiter character, and the entire difficulty in converting between them comes down to one detail — correctly quoting fields that contain the new delimiter — which is easy to get wrong by hand and trivial for a proper converter to handle.