How to use the csv to tsv converter
- Paste your CSV data into the input area.
- Choose the delimiter that matches your file (comma, semicolon, tab, pipe, or a custom character).
- Copy the TSV output from the result area: tabs separate every field.
How the conversion works
The tool parses the input using a strict RFC 4180 compliant parser written in TypeScript. It scans the text character by character, tracking whether it is inside a quoted field. When inside quotes, commas (or the chosen delimiter) and newlines are treated as literal characters. Two consecutive quote characters ("") represent a single literal quote. The parser emits an array of rows, each an array of field strings. The output joins each row with a tab character and rows with a newline. A quote only opens a quoted field at the start of a field, so a stray quote inside a plain value stays a literal character.
For example, the CSV line "A, B","C""D",E with comma delimiter produces three fields: A, B, C"D, and E. The TSV output is A, B\tC"D\tE. TSV has no quoting, so a tab or line break inside a cell cannot be kept. Each one is replaced with a single space and a note tells you how many cells changed. Everything else is carried over exactly. A UTF-8 byte order mark at the start of the input is dropped.
Ragged rows and column counts
Real-world CSV files often have rows with different numbers of columns. The parser does not pad or truncate; it reports the exact field count per row. The result area shows the TSV output, and the summary rows below indicate the total rows parsed, the maximum column count seen, and whether any ragged rows were detected. This helps you spot data quality issues before importing into a database or spreadsheet.
If the input has a header row and subsequent rows have fewer or more fields, the summary will flag Ragged rows: Yes. You can then decide whether to fix the source or handle the mismatch downstream.
Common delimiters by region and tool
Different locales and applications use different default separators. The table below lists the most common ones.
| Delimiter | Typical Use | Example |
|---|---|---|
| Comma (,) | US/UK default, Excel (English), most web exports | a,b,c |
| Semicolon (;) | European Excel (German, French, etc.), some databases | a;b;c |
| Tab (\t) | TSV files, some scientific data | a\tb\tc |
| Pipe (|) | Legacy mainframe exports, some log formats | a|b|c |
If your file uses something else (caret, tilde, multiple characters), choose Custom and enter the single character you need. Only the first character of the custom field is used.
When to use TSV instead of CSV
Tab-separated values avoid the quoting complexity of CSV because tabs rarely appear inside textual data. TSV is easier to parse, faster to stream, and works well with Unix tools like cut, awk, and sort. Tools such as awk, cut and sort split on a single character, which is why TSV is popular for pipelines. Convert to TSV when you control the downstream consumer and want a simpler format. Check the loader first: some systems treat backslash sequences or quote characters in TSV differently. This csv to tsv tool makes that easy.
However, if you must exchange data with Excel users in European locales, CSV with semicolon delimiters may be more compatible. This tool lets you go either way: use the sibling TSV to CSV converter for the reverse direction.
Edge cases handled
- Empty input returns an error rather than silent empty output.
- Trailing newline after the last row is ignored, and blank lines are skipped.
- CRLF (\r\n), bare LF (\n) and bare CR line endings are all accepted.
- Fields containing only whitespace are preserved exactly.
- Tabs and line breaks inside a cell are replaced with a space, with a note.
- Unclosed quote at EOF is treated as a quoted field running to the end of input, with a note.
- Custom delimiter longer than one character uses only the first character.
- Size: the tool stops at about 3 MB of input or 2 million cells.
Worked examples
| Example | Input | Result |
|---|---|---|
| Simple CSV | CSV Input: name,age,city / Alice,30,New York / Bob,25,Los Angeles; Input Delimiter: , | Rows parsed: 3; Max columns: 3; Ragged rows: No |
| Quoted fields with commas | CSV Input: product,price,notes / "Widget, Large",19.99,"Includes tax, shipping" / "Gadget",9.99,""; Input Delimiter: , | Rows parsed: 3; Max columns: 3; Ragged rows: No |
| Embedded newlines | CSV Input: id,description / 1,"Line one / Line two" / 2,"Single line"; Input Delimiter: , | Rows parsed: 3; Max columns: 2; Ragged rows: No |
| Semicolon-delimited (European) | CSV Input: Vorname;Nachname;Alter / Hans;Müller;42 / Greta;Schmidt;35; Input Delimiter: ; | Rows parsed: 3; Max columns: 3; Ragged rows: No |
| Ragged rows (uneven columns) | CSV Input: a,b,c / 1,2 / 3,4,5,6; Input Delimiter: , | Rows parsed: 3; Max columns: 4; Ragged rows: Yes |
FAQ
Does this tool send my data to a server?
No. The csv to tsv parsing and conversion happen entirely in your browser. Nothing is uploaded.
Can I convert very large files?
Yes, within a limit. The page handles about 3 MB of input or 2 million cells and shows a clear message above that, so the browser tab never hangs. Split larger files first.
What if my CSV uses a delimiter not in the list?
Select Custom and type the character (e.g., ^, ~, or ::). Only the first character is used as the delimiter.
How are ragged rows reported?
The summary rows show Rows parsed, Max columns, and Ragged rows (Yes/No). The TSV output keeps each row at its own field count; missing fields are not added.
Does the tool support UTF-8 and special characters?
Yes. The parser works on Unicode strings. Emoji, accented letters, and non-Latin scripts are preserved unchanged.
Can I convert TSV back to CSV?
Use the TSV to CSV tool for the reverse conversion. It reads quoted fields the same way.
What happens with an unclosed quoted field at the end of the file?
The parser treats the unclosed quote as opening a quoted field that continues to the end of the input, and a note tells you it happened. No data is dropped.