Convert CSV to TXT
Paste CSV or drop a file and get a tab-delimited text file back, made on this device.
- Nothing is uploaded
- Works offline after first visit
- Open source
- No account, no watermark. A file can be up to 200 MB, and phones hold less.
Converts a CSV file to a plain .txt: the commas between cells become tabs, which most databases and import wizards accept as a tab-delimited file, or you can choose pipes, semicolons or columns padded with spaces so the text lines up when you read it. It is free, needs no account and adds no watermark, and your data is not uploaded: what you paste and the files you drop are converted by code in this tab.
Done
Free, no ads. Support StayPut
Open the network tab. Your files never appear in it.
Add files and run the tool to see every request this tab makes.
Your files are processed on this device and never sent to a server. Reload the page to clear everything from memory.
Some systems will not take a CSV but will take a tab-delimited .txt: an import wizard, an older database loader, a mainframe feed, a spreadsheet template that says “save as Text (Tab delimited)”. Tabs rarely appear inside the text of a cell, which is why they are used when commas would get in the way.
Worked example. This CSV has a comma and quote marks inside quoted cells:
id,name,note 1,"Hopper, Grace","said ""debug it""" 2,Ada Lovelace,first programmer
Paste it and press Convert to TXT. The cells are read with the CSV quoting rules, so the quoted comma is part of the name, and they are written back separated by tabs:
id name note 1 Hopper, Grace said "debug it" 2 Ada Lovelace first programmer
The quoting is gone because tabs do not need it: Hopper, Grace is one cell without any quote marks. A cell that holds a tab or a line break is still quoted so it reads back as one cell. Under Options you can write pipes or semicolons instead, or choose “Spaces, padded to line up” to get columns you can read in any editor, with each column as wide as its longest cell.
The first 20 rows appear as a table before you download. The file is saved as .txt and uses CRLF line endings unless you choose LF.
For the other direction, TXT to CSV reads tab, semicolon, pipe or space-separated text and writes a CSV. To turn the CSV into JSON, use CSV to JSON, or JSON to CSV to go back.
How it works
- Paste the CSV into the box, or drop a .csv file. The page works out the separator it uses.
- Choose what to write between cells: tab (the default), pipe, semicolon, or spaces padded to line up.
- Press Convert to TXT, check the preview table, then copy the text or download the .txt file.
In your browser, not on a server
A small parser written for this page, with no library, reads your text in a background worker in this tab. JSON is read with the browser’s own JSON parser, and one object per line is accepted too. CSV is read by a parser that follows RFC 4180: quoted values, a doubled quote for a quote, and line breaks inside quotes; the delimiter is detected from the first lines unless you choose one. Text separated by tabs, pipes, semicolons or runs of spaces can be rewritten with another delimiter, using the same parser and, for spaces, a reader that keeps a single space inside a cell. The result is written in the tab, with quoting added only where a value needs it and, if you leave it ticked, a UTF-8 byte-order mark at the start so Excel reads the letters correctly.
Compared with upload-based tools: Online converters make you paste or upload the data to their server, and customer lists and exports are often exactly the data you should not hand over. Here what you paste and any file you drop is converted on your device and never sent anywhere, and the limit is your device’s memory (phones hold less).
Verify it yourself. Give the page a short while after one visit to save itself for offline use, then turn off Wi-Fi or switch to airplane mode and run the tool again. Or open your browser's developer tools (F12, or Cmd-Option-I on a Mac), pick the Network tab, and watch it while you convert. The panel above does the same count for you.
Questions
How do I convert a CSV file to TXT?
Paste the CSV into the box or drop the file, leave the output on Tab, and press Convert to TXT. Copy the result or download it as a .txt file. The first 20 rows are shown as a table so you can check the cells before you use the file.
What happens to commas inside a cell?
They stay in the cell. The CSV is read with its quotes, so "Hopper, Grace" is one cell, and it is written out without quote marks because a tab separates the cells now. If you choose comma as the output on the TXT to CSV page, the quotes come back.
Is a tab-delimited .txt the same as a .tsv?
The content is the same: cells separated by tabs, one row per line. This page names the file .txt, which is what many import tools ask for. Rename it to .tsv if the program you are loading it into wants that ending; nothing inside the file changes.
What does “Spaces, padded to line up” do?
It writes each column as wide as its longest cell, plus two spaces, so the text lines up in a plain editor. It is easy to read but is a layout rather than a data format: a cell with two or more spaces, a tab or a line break is put in quotes, and an empty cell is written as "".
Do cells that start with = + - or @ matter?
In a tab-delimited .txt they do not run as anything, but if you open the text in Excel or paste it into a sheet, a cell that starts with one of those characters may be read as a formula, so look over data from a source you do not trust first. Your cells are written exactly as they were.
Is my file uploaded?
No. The text you paste, or the file you drop, is read and rewritten by code running in this tab, in the background so the page stays usable. A file can be up to 200 MB; a phone may run out of memory on a smaller one, and the page says so instead of giving a half result.
More PDF tools
JSON ↔ CSV
Paste or drop your data, choose a direction and get a table or an array back. What you paste stays on this device.
Merge PDF
Combine PDFs into one document and set the order with the arrows. No watermark, nothing uploaded, and the size limit is your device’s memory (phones hold less).
Split PDF
Pull out the pages you need, or break a document into single pages. Done on your device.
Compress PDF
Shrink a PDF for email or an upload limit. Pick a level, or type the size you need, like 1 MB, and the page tries the gentlest setting that fits. Processed on your device.