What kinds of text files convert to CSV
You don't tell the converter how the file is laid out. It reads the text and decides, file by file.
- Files that already use a separator: commas, tabs, semicolons or pipes. Quoted values stay in one cell, and European numbers like 1.234,56 and thousands written as 1,234 aren't split in the wrong place.
- Space-aligned tables, where columns line up by spacing: bank statements, printed reports, and command output such as
tasklist,kubectl getanddocker ps. Repeated page headers and columns that are empty on some lines are handled. - Results copied from database tools: MySQL, psql, sqlite, SQL Server and Oracle, plus Markdown tables and tables drawn with box characters.
Text that isn't a table, such as notes, a plain list or JSON lines, becomes a single column. Nothing gets chopped up at random spaces.
How to convert TXT to CSV
- Upload the .txt file with the box at the top of the page.
- Choose CSV as the output.
- Convert and download the .csv file.
The conversion runs on our servers. Big files are read in a stream rather than loaded all at once, so a large log or export won't run out of memory.
Why space-aligned text is the hard case
A comma-separated file announces its columns. A bank statement or a kubectl listing doesn't. Its columns are only lined up by spaces, a description can contain spaces of its own, and some rows leave a column blank. Splitting on every space breaks a description like "Card payment London" into three cells. The converter works out the column positions from the layout of the whole file, the way a person reads the page, instead of splitting on every space.
Encodings, and opening the CSV in Excel
Text files come in UTF-8, UTF-16 and older Windows code pages, and a file saved by Notepad on one machine may not match one exported from a bank on another. The converter detects the encoding before it reads anything. The CSV it writes starts with a byte order mark, a small marker that tells Excel the file is UTF-8, so accented letters and other scripts show correctly when you double-click it instead of turning into symbols.
Files that won't convert
An empty file, or a binary file that's been renamed to .txt, gets a clear message instead of a meaningless CSV. If your file is a spreadsheet saved under the wrong name, rename it to its real extension and use the matching converter.
Where to go from CSV
Once you have the CSV, CSV to XLSX makes a proper Excel sheet, CSV to DBF builds a dBASE table and CSV to XML exports the rows as XML. For other text exports, TXT to XML and TXT to PDF are available. The TXT converter and CSV converter pages list every option.