TSV to CSV Converter: Delimiters, Quotes, Line Endings
Pricing
from $0.03 / 1,000 converted rows
TSV to CSV Converter: Delimiters, Quotes, Line Endings
Convert TSV to CSV, CSV to TSV, or semicolon / pipe / custom separated files from URLs or Apify datasets. Handles quoted cells, quote-all, trimming, LF/CRLF and UTF-8 / BOM / Shift_JIS / cp1252 output. Empty input = free demo.
Pricing
from $0.03 / 1,000 converted rows
Rating
0.0
(0)
Developer
Actor Factory
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
7 days ago
Last modified
Categories
Features
Share
Convert TSV to CSV, CSV to TSV, or any separated file to semicolon, pipe or a custom character, with quoted cells kept intact
For anyone who gets a tab-separated export and needs a CSV, or the other way round: analysts feeding a database loader, e-commerce teams moving product lists between systems, and people in Europe whose Excel wants semicolons. Give this Actor file URLs (or an Apify dataset that holds files), choose the output delimiter, and get the converted file plus a public download link. The input delimiter is detected for you. $0.0015 per converted file plus $0.00005 per converted row ($0.05 per 1,000 rows), header row not counted. The $5 monthly free credit covers about 97 files of 1,000 rows. Failed files and the demo are free. No scraping, no API keys.
Try it free: leave the file list empty and press Start (clear the prefilled URL first). The demo converts a built-in sample TSV, is not charged and the result row carries _demo: true.
The problems it solves
- A TSV export has to become a CSV (or the reverse). A find-and-replace of tabs breaks as soon as a cell contains a comma, a quote or a line break. This Actor reads the file as a table, so a cell like
"two lines"or5,5stays one cell and gets quotes only where the new delimiter needs them. - European Excel opens a comma CSV in one column. Convert to semicolons, CRLF line endings and UTF-8 with BOM, and it opens correctly by double-click.
- An importer wants every cell quoted, or rejects stray spaces. Turn on
quoteAllandtrimCells. - A legacy system wants pipes, a rare character, Shift_JIS or Windows-1252. Pick pipe or your own single character (for example
~), and Shift_JIS or Windows-1252 as the output encoding.
What it does
- Detects the input delimiter (comma, semicolon, tab, pipe) from the first lines, or use the one you set (also any single custom character).
- Writes the output delimiter you choose: comma, tab, semicolon, pipe or a custom character. Quotes inside cells are doubled, cells with the delimiter, a quote or a line break are quoted.
- Quote every cell (optional) and trim spaces around cells (optional).
- Line endings: LF or CRLF between rows; line breaks inside quoted cells are kept.
- Output encoding: UTF-8 (default), UTF-8 with BOM, Shift_JIS or Windows-1252. The input encoding is detected the same way as in the CSV Encoding Converter (byte-order mark, valid UTF-8, then a statistical detector). A character the output encoding cannot hold makes that file fail for free instead of being changed.
- Reports per file: rows, columns, delimiters used, line endings, number of rows whose column count differs from the first row (they are kept as they are), and the file URL.
- Several files per run; each file gets its own output file and one result row.
Input example
{"fileUrls": ["https://example.com/exports/products.tsv"],"inputDelimiter": "auto","outputDelimiter": "semicolon","quoteAll": false,"trimCells": true,"lineEnding": "crlf","outputEncoding": "utf-8-bom"}
Files that an earlier step produced can come from an Apify dataset: use datasetIds with items like {"fileName": "products.tsv", "contentBase64": "..."}.
A real example
This tab-separated file (the second cell of row 2 holds a comma, the note of row 3 holds a line break):
id name note price1 Sample Co. Tokyo, Japan 128002 Test Ltd. "twolines" 5400
with outputDelimiter: "semicolon", trimCells: true, lineEnding: "crlf" becomes:
id;name;note;price1;Sample Co.;Tokyo, Japan;128002;Test Ltd.;"twolines";5400
and the result row says:
{"source": "https://example.com/exports/products.tsv","status": "ok","rows": 2, "columns": 4, "raggedRows": 0,"delimiterIn": "tab", "delimiterOut": "semicolon","lineEndingIn": "lf", "lineEndingOut": "crlf","targetEncoding": "utf-8-bom", "targetBom": true,"chargedRows": 2, "chargedFiles": 1,"outputKey": "products.csv","outputUrl": "https://api.apify.com/v2/key-value-stores/…/records/products.csv?signature=…"}
Output
- Dataset: one row per source file.
- Key-value store: the converted file under
outputKey. The extension follows the output delimiter:.csvfor comma and semicolon,.tsvfor tab,.txtfor pipe and custom characters.outputUrlis Apify's signed public link, so you can share the file without sharing your token. - STATS record: files converted and failed, rows converted and rows charged.
Limits (cannot be raised by input)
- 50 MB per source file; 50 files per run (200 MB in total for files read from datasets)
- A download is tried up to 3 times when the server is slow or answers with a temporary error (HTTP 429, 5xx); a clear error such as 404 is not retried. The timeout is 60 seconds per request
- Source URLs must be public
httporhttpslinks. Addresses on internal networks (localhost, private ranges, cloud metadata) are blocked, also after redirects - Text files only (TSV, CSV, pipe-separated and similar). Excel workbooks, PDFs and other binary files are not converted
- The custom delimiter is one character; a quote mark, a space or a line break cannot be used
- Rows are counted as records: blank lines are skipped and a quoted cell with line breaks counts once
- The first row is treated as a header and not charged; set
hasHeaderto false for files without one
Pricing
Pay per event: $0.0015 per converted file (event file) plus $0.00005 per converted row (event row). The header row is not counted. A 1,000-row file costs $0.0515. A file that fails (download error, no data rows, characters that do not fit) is not charged. Set a maximum charge per run to cap spend; a file that does not fit in the remaining budget is skipped whole, never cut.
FAQ
Will a comma inside a cell break my TSV to CSV conversion? No. The file is read as a table: that cell is written in quotes in the CSV. Quoted cells with line breaks stay one cell.
What if the input delimiter is guessed wrong? Set inputDelimiter yourself (comma, tab, semicolon, pipe or custom). The result row shows which one was used.
Do my cells change? Only as far as you ask: quotes follow the new delimiter, and spaces are removed only with trimCells. Rows with a different number of columns are kept as they are and counted in raggedRows.
Does it change my source? No. It only reads the file and writes a new one.
Is the file link private? Anyone holding the signed link can download that file; it gives no access to anything else in your account.
If this Actor saved you time, a rating on the Store helps others find it.
More tools from the same developer
- CSV Encoding Converter — detect the encoding of CSV and text files and convert them to UTF-8 (or another encoding)
- CSV to Excel Converter — convert CSV, TSV, Excel XLSX, JSON and NDJSON files or Apify datasets into each other
- CSV to JSON Converter — turn CSV files into typed JSON: encoding and delimiter detected, numbers and booleans typed, dotted headers nested, array, NDJSON or keyed output
- CSV Splitter — split a dataset or CSV/JSON file into parts by rows, parts, column value or size, or take a random sample
- JSON to CSV Converter — turn nested JSON files or datasets into one flat CSV file