CSV ↔ TSV Converter
Switch between comma-separated and tab-separated values, with correct quoting in both directions.
0 characters
0 characters
About CSV ↔ TSV Converter
CSV and TSV are the same shape of data with different delimiters: CSV uses commas, TSV uses tabs. This converter reparses the input with its source delimiter (handling quoted fields, doubled-quote escapes, and embedded newlines) and re-emits it with the destination delimiter, requoting only when necessary.
When to use it
- Converting a CSV export so it pastes cleanly into Excel or Google Sheets (which prefer tabs)
- Adapting a TSV produced by a SQL COPY for a tool that only accepts CSV
- Stripping the commas-inside-cells quoting noise by switching to a tab delimiter
- Migrating between teams that standardize on different delimiters
How it works
The input is parsed by a stateful tokenizer that recognizes the source delimiter, double-quoted fields, doubled-quote escapes ('') and both LF and CRLF line endings. The resulting rows are re-serialized with the destination delimiter, requoting fields that contain the new delimiter, a quote, or a newline.
Examples
CSV → TSV (quoting becomes unnecessary)
name,role,city Ada,"Engineer, Lead",London Grace,Admiral,New York
name role city Ada Engineer, Lead London Grace Admiral New York
TSV → CSV (commas now require quoting)
name note Ada Hello, world Grace Hi there
name,note Ada,"Hello, world" Grace,Hi there
Frequently asked questions
- Does this change my data?
- No. The cell values are identical — only the delimiter and the resulting quoting change.
- Why are some fields quoted in CSV but not TSV?
- CSV requires quoting any field that contains a comma, double-quote, or newline. Tabs almost never appear inside real text, so TSV usually escapes nothing.
- Does it preserve trailing blank lines?
- Empty trailing rows are dropped. If you need to preserve them, add a placeholder character to the row before converting.
- What about line endings?
- Both CRLF and LF inputs are accepted. Output uses LF — most modern tools accept either.