The obvious way to do this conversion, replacing every comma with a tab, breaks the moment a single field's own content contains a comma inside quotes, which is common in any export containing an address, a name written as last comma first, or a free text note. A naive replace either destroys the quoting around that value or shifts every column after it, silently corrupting the row.
Everything runs locally in your browser using a state machine parser that understands CSV quoting rules, so a field like "Lovelace, Ada" is read as one value and written out correctly as one tab separated field rather than being split apart. Nothing you paste or upload is sent anywhere, which matters when the file behind the conversion is an export you would rather not hand to a third party service.
When you should use this CSV to TSV converter for delimiter conversion
Tab separated values are the format many bioinformatics tools, some database export commands and a number of older Unix style command line utilities expect by default, so converting is the right move whenever a script or pipeline built around tabs needs to consume a file that started life as a comma separated spreadsheet export.
It is also useful whenever a value in your data is likely to contain a comma, since tabs rarely appear naturally inside ordinary text. Converting to tab separated values before feeding a file into a tool that does its own naive splitting on the delimiter reduces the chance that an unescaped comma inside a cell gets misread as a column boundary further down the pipeline.
- Convert to TSV when a command line tool or data pipeline expects tab separated values.
- Convert to TSV before feeding a file into a tool that does its own naive delimiter splitting.
- Convert to TSV when your data is likely to contain commas inside individual fields.
- Keep CSV when the destination is a spreadsheet application, which almost always defaults to commas.
Why a naive comma to tab swap breaks quoted fields
A simple find and replace of every comma with a tab looks like it should work and fails the instant a field's own content already contains a comma wrapped in quotes for exactly that reason. A row like `1,"Ada, Lovelace",admin` has three intended columns, but blindly replacing commas turns the comma inside the name into a fourth tab separated field, shifting everything after it.
This csv to tsv converter avoids that failure by parsing the file properly first. It walks the text tracking whether it is currently inside a quoted field, so a comma inside quotes is read as literal data rather than a column separator, and only once every field's true boundaries are known does it write the output using tabs.
How embedded quotes and newlines survive the csv to tab separated values conversion
RFC 4180 style CSV allows a field to contain the delimiter, a literal quote character, or a raw line break, provided the whole field is wrapped in double quotes and any literal quote inside it is doubled as an escape. This converter's parser reads all three cases correctly: an embedded comma and an embedded newline are both treated as data rather than structure while inside a quoted field, and a doubled quote decodes to one literal quote character.
On the way out, most fields no longer need any quoting at all once the delimiter is a tab, since tabs are far less likely than commas to appear naturally in real text. A field is still quoted in the TSV output if it contains a literal tab character, a quote character or a line break, so nothing from the original data is lost just because the visible need for quoting became rarer.
Choosing a quoting style for the output
By default this tool only wraps a field in quotes when its own content requires it, which keeps the resulting file compact and matches what most TSV consuming tools expect. Turning on quote every field instead wraps every single value in quotes regardless of content, which some strict downstream parsers require and which also makes column boundaries visually obvious when the file is opened in a plain text editor.
Whichever style you pick is applied consistently to the whole file, and any quote character already present in a value is doubled correctly in the output, following the same escaping convention CSV and TSV parsers both use.
Converting csv to tsv online without installing anything
Because the whole conversion runs as plain JavaScript in your browser tab, there is nothing to install and no command line tool to configure just to convert a single file. This makes it a fast way to convert csv to tsv online when you need a one off result rather than a permanent step in a data pipeline.
There is also no size limit imposed by the tool beyond your device's own memory, since the parser that tracks quoted fields and the writer that assembles tab separated output both run in the same JavaScript execution as the rest of the page, with no request ever leaving the tab.
How to convert CSV to TSV
- 1
Add your CSV
Paste CSV text into the box, or drop a .csv file onto the upload area. Nothing leaves your device.
- 2
Set the quoting style
Leave quoting minimal for compact output, or turn on quote every field for stricter downstream tools.
- 3
Convert
Press convert. A malformed quoted field is reported with the exact line and column it started at.
- 4
Download or copy
Once conversion succeeds, download the .tsv file or copy the tab separated result to your clipboard.
Related tools worth bookmarking
Sources and further reading
- RFC 4180: Common Format for CSV FilesThe specification this converter's CSV side quoting and escaping rules are based on.rfc-editor.org
- W3C: Model for Tabular Data and MetadataThe W3C recommendation describing tabular text formats including delimiter separated values.w3.org
- MDN: FileReaderThe browser API used to read an uploaded CSV file locally without a network request.developer.mozilla.org
Frequently asked questions
Common questions about the csv to tsv converter.
No, provided the source file is well formed. The row and column counts shown after conversion should exactly match the source CSV, since the delimiter aware parser reads the same fields it would for any other output format and only the separator character and quoting rules change on the way out.
Yes. A comma inside a quoted CSV field is recognised as data rather than a column separator during parsing, so it survives correctly into the TSV output as part of that same field's text, with no extra column introduced by mistake.
Any field containing a literal tab character is automatically wrapped in quotes in the TSV output, since an unquoted tab inside a field would otherwise be indistinguishable from the real column separator. This keeps the converted file readable by any standard tab separated values parser.
Yes, provided your original file did not rely on unusual delimiter specific behaviour. Because the parser is delimiter aware rather than a blind character swap, quoted fields, embedded delimiters and embedded quotes all round trip correctly between the two formats.
The tool reports a clear error naming the exact line and column where the unclosed quote started, rather than silently producing corrupted or shifted rows. Fixing the missing closing quote in your source file and converting again resolves the error.
No. The state machine that tracks whether it is inside a quoted field runs as JavaScript in your own browser tab, reading the CSV and writing the tab separated result in one local pass, so a data export never has anywhere else to go during the conversion.