TXT to CSV Converter
Many systems export tables as .txt files with tabs, pipes or semicolons between the columns. Upload them here and get a standard comma-separated CSV that spreadsheets and import screens read on the first try.
Data Converter
or drop CSV, TSV, TXT … files here ·
Max 95 MB per file· Up to 20 files· Deleted after 30 minutes
Files are processed on our servers and deleted after 30 minutes.
Character that separates columns in CSV and text files, for both reading and writing. Auto detects it from the input and writes commas.
UTF-8 works for every language. Choose UTF-8 with BOM if Excel on Windows shows garbled accents or Asian characters when opening the CSV.
Excel, ODS and Numbers input: convert the first sheet only, or every sheet (one CSV per sheet in a ZIP, or one JSON key per sheet).
Name of the sheet tab in the new spreadsheet, up to 31 characters.
Array of objects uses column names as keys for every row; array of arrays is more compact and keeps the header as the first array.
Name of the outer element that wraps all rows; each row becomes a <row> inside it.
Used in CREATE TABLE and INSERT statements. Letters, digits and underscores only.
Quoting and column types differ slightly between databases; pick the one you will import into.
Rewrite date cells in one format. ISO (2026-10-18) is safest for databases and code; keep leaves them as they appear in the source.
How to use this tool
- 1
Upload the text files
Add .txt or .tsv exports, up to 20 files of 95 MB each. Each line should be one record, with the same separator between every column.
- 2
Let the delimiter be detected
Delimiter starts at Auto detect, which finds tabs, pipes, semicolons or commas in the input. Set it by hand under Advanced settings if the file mixes them, and set Text encoding if accents look wrong.
- 3
Convert to CSV
Press Convert to CSV and download. The output uses commas, UTF-8 and quotes only where a value needs them.
Where delimited TXT files come from
A .txt full of columns is usually an export nobody designed for spreadsheets. Bank and payroll systems, point-of-sale terminals, lab instruments, mainframe reports and database clients all write tables as plain text, often with tabs or pipes instead of commas because those characters rarely appear inside names and addresses. Copying a table from a web page or a PDF and pasting it into Notepad produces the same thing.
The receiving software is stricter. Mailing platforms, CRM imports, accounting packages and Google Sheets' upload dialog look for a .csv, and Excel opens a .txt through a wizard that asks about delimiters. Converting once gives you a file that opens directly. If the destination is an app instead of a sheet, TXT to JSON produces objects keyed by the header row.
Delimiters the TXT to CSV converter reads
- Tab
- The separator of TSV files and of tables copied from spreadsheets or web pages.
- Pipe |
- Common in exports from older enterprise and banking systems, because names and addresses almost never contain one.
- Semicolon ;
- What Excel writes in regions that use a comma as the decimal mark, such as Germany, Italy or the Netherlands.
- Space
- Works only when no value contains a space of its own.
Convert TXT to CSV: a pipe-delimited example
id|name|city|balance 301|Okafor, Ada|Lagos|1200.50 302|Lindqvist|Malmö|88.00 id,name,city,balance 301,"Okafor, Ada",Lagos,1200.50 302,Lindqvist,Malmö,88.00
- delimiter options incl. auto
- 6
- text encodings
- 8
- files per batch
- 20
- per file
- 95 MB
Notice the second record. The name contains a comma, so the CSV wraps it in double quotes; without them an importer would see five columns instead of four. The Swedish ö survives because the output is UTF-8. Those two rules, quoting and encoding, account for most failed CSV imports.
TXT and CSV format facts
TXT
Plain text
A TXT file contains only plain characters with no formatting, fonts, images or layout. Modern text files are usually encoded in UTF-8, which covers every language, though older files may use other encodings and show garbled characters. Plain text is tiny, never becomes obsolete and opens on every device, from phones to servers. It cannot hold bold text, tables or pictures, so structure must be expressed with spacing or simple markup.
- Compression
- –
- Transparency
- –
- Animation
- –
- Introduced
- –
CSV
Comma-separated values
CSV is a plain-text format for tables in which each line is a row and commas separate the columns. It has been used since the early days of computing and is described in RFC 4180, though many variants use semicolons or tabs and different text encodings. Nearly every spreadsheet, database and analytics tool can import and export it, which makes it the default format for moving data between systems. CSV stores only values, with no formulas, formatting, multiple sheets or data types.
- Compression
- –
- Transparency
- –
- Animation
- –
- Introduced
- –
People convert TXT to CSV when a system wrote a table as loosely delimited text and the next program will only import comma-separated values.
TXT to CSV questions
What is the difference between a TXT and a CSV file?
Both are plain text. The .csv extension promises a specific layout, values separated by commas with quoting rules from RFC 4180, so programs open it as a table straight away. A .txt promises nothing; the separator could be a tab, a pipe or a space, and an importer has to be told which one.
Can I convert a tab-delimited text file to CSV?
Yes, that is the most common case. Tab-separated exports come from databases, clipboard copies of tables and many reporting tools. Auto detect recognizes the tabs, and any value that contains a comma is quoted in the CSV so it stays in one column.
My text file lines up columns with spaces. Will that work?
Only if no value contains a space. The Space delimiter treats each space as a column break, so a city like New York would split in two. Fixed-width reports, where columns are padded to line up, need their columns defined by position in a spreadsheet's import wizard instead.
Why do names with accents look broken after opening the CSV?
The text file and the program disagree about encoding. Older Windows tools saved text as Windows-1252, while Notepad has defaulted to UTF-8 since the Windows 10 May 2019 Update. Set Text encoding to match the source, or choose UTF-8 with BOM so Excel on Windows reads the output correctly.
Can I convert the text straight to an Excel workbook?
Yes: change Convert to to XLSX. A workbook avoids the step where Excel guesses column types, which matters for codes with leading zeros. Use CSV to XLSX later for files that are already CSV.