TXT to CSV Converter
Convert delimited or space-aligned text files to CSV
Free, no signup. Runs entirely in your browser — files stay on this device.
Drop your file here or browse from your device
Accepts TXT, DAT, PRN, LOG, TSV. Maximum input: 10 MiB. Files above this hard limit are rejected before local processing.
Turn a plain-text file into a CSV you can open in Excel or import anywhere. Upload a .txt, .dat, .prn, or .log file — or paste the text — and the converter works out how the columns are separated before you download.
"Text file" covers a lot of shapes, so this does not assume one. It recognises tab-, comma-, semicolon-, and pipe-delimited exports, and also the space-aligned columns that command-line tools and legacy reports print, where a single space can sit inside a value like "New York" but columns are padded apart. If the guess is wrong, pick the separator yourself and the preview updates immediately.
Rows with missing trailing values are padded rather than dropped, so every value stays under the right header. The file is read and converted in your browser; nothing is uploaded.
How to Convert TXT to CSV
- Upload a .txt file or paste the text
- Check the detected column separator and change it if the preview looks wrong
- Untick "First line is a header row" if the file has no header
- Pick the CSV delimiter and encoding, then download the CSV file
Features
- Detects tab, comma, semicolon, pipe, and space-aligned columns automatically
- Splits aligned report output on runs of two or more spaces, keeping multi-word values intact
- One-value-per-line mode turns a plain list into a single-column CSV
- Respects quoted values, so delimiters inside quotes stay in one field
- Pads short rows instead of dropping data, and tells you how many were padded
- Choose the CSV delimiter and the UTF-8, UTF-8 with BOM, or Latin-1 encoding
- Reads Windows-1252 and UTF-16 text files without mangling accented characters
- Runs entirely in your browser — no upload, no signup
Use Cases
- Convert a tab- or pipe-delimited .txt export from accounting or ERP software into CSV
- Turn space-aligned command-line or mainframe report output into spreadsheet columns
- Make a single-column CSV from a list of emails, SKUs, or IDs saved in Notepad
- Prepare a .dat or .prn data file for an import tool that only accepts CSV
Frequently Asked Questions
How do I convert a TXT file to CSV?
Upload the .txt file, confirm the column separator the converter detected (tab, comma, semicolon, pipe, or aligned spaces), and click Download CSV. The values are quoted where needed so the CSV opens with the same columns in Excel or Google Sheets.
Why not just rename the .txt file to .csv?
Renaming only works when the text is already comma-separated with correct quoting. A tab-, pipe-, or space-separated file renamed to .csv opens as one long column, and any value containing a comma is split in two. Converting rewrites the separators and quotes those values.
My text file has columns lined up with spaces. Will that work?
Yes. Choose "Two or more spaces" (it is usually detected automatically). Columns are split wherever two or more spaces appear, so single spaces inside values such as names or cities are kept. If your values never contain spaces, "Any whitespace" splits on every space instead.
What if my file has no header row?
Untick "First line is a header row". The first line is then treated as data and the columns are named Column 1, Column 2, and so on in the CSV.
Can I turn a plain list into a CSV?
Yes. With "One value per line", each non-empty line becomes one row in a single-column CSV — useful for lists of emails, product codes, or IDs.
What is the file size limit?
Files up to 10 MiB can be loaded. The file is read and converted in your browser, so nothing is uploaded to a server.