TXT to CSV
How to convert a TXT file to CSV: tab, pipe or semicolon
Drop a .txt file up to 1.5 GB on rows.page, free with no signup, and it detects 4 delimiters (comma, tab, semicolon and pipe) and exports a comma-separated CSV in your browser. Fixed-width text needs Excel or a script instead.
No file handy? Open CO2 emissions by country and year (50k rows, 14 MB).
How to tell what kind of TXT file you have
A .txt extension says nothing about the data inside. Open the file in a text editor and look at the first few lines: values are either separated by a character, lined up by character position, or not a table at all.
Most data exports saved as .txt are delimited by tabs, pipes, semicolons or commas. Fixed-width files pad each field with spaces so the columns line up, with no separator between them. Free text such as logs or notes has no consistent columns.
| What is in the TXT | Example line | How to convert it |
|---|---|---|
| Delimited text (tab, pipe, semicolon, comma) | 101|Alice|NL|42.50 | Drop on rows.page and export as CSV, or run DuckDB read_csv |
| Fixed-width columns | 101 Alice NL42.50 | Excel: legacy Text Import Wizard (Fixed width) or Power Query Split Column > By Positions |
| Free text | Order 101 placed by Alice | Extract the fields with a script first; it is not a table yet |
How to convert a delimited TXT file to CSV in rows.page
- Drop the
.txtfile on rows.page, choose it from your computer, or click Paste data, paste the text and click Open. - rows.page reads
.txtas CSV, and DuckDB's sniffer detects the delimiter (comma, semicolon, tab or pipe) and the header row. There is no manual delimiter setting. - Check the Columns panel to confirm the fields split cleanly: each column shows its type, distinct count, share of empty values, min and max for numbers and dates, and a histogram or the top 10 values.
- Optionally clean the rows with a filter such as
country:NL,price:>20or-name:*(is empty), or with SQL against the tabledata, for exampleSELECT DISTINCT * EXCLUDE (__rid) FROM datato drop duplicate rows. - Click Export and choose CSV.
DuckDB-WASM reads the file inside your browser, so it is not uploaded. A .txt file over 1.5 GB loads partially, with the note Loaded the first N rows: the file is X, more than the browser can hold.
Export writes your current view, including the filter, sort, hidden columns or SQL result. The file is always comma-delimited with a header row, in UTF-8 without a BOM, and text cells starting with =, +, -, @, a tab or a carriage return get a leading apostrophe so spreadsheets don't run them as formulas.
You can't pick a different delimiter, encoding or BOM for the export. Filtered views export every matching row, SQL results stop at 1,000,000 rows, and you can't edit cells or merge two files in rows.page.
Why does a TXT file show wrong characters or fail to open?
Text files from older systems are often not UTF-8, which garbles accented letters and currency signs. rows.page checks the bytes of every .txt, CSV and TSV file it opens and always exports UTF-8:
- UTF-8 files open as they are.
- UTF-16 files with a byte order mark (BOM) are decoded with the note
Read as UTF-16 text. - Other files that are not valid UTF-8 are read as Latin-1 (ISO-8859-1) with the note
Read as Latin-1 text. - Any byte from
0x80to0x9Fmakes the Latin-1 read fail, and rows.page showsCouldn't open this data. In Windows-1252 files those bytes are the euro sign, curly quotes, en and em dashes and the trademark sign.
For a Windows-1252 file, convert it to UTF-8 first and open the new file:
iconv -f WINDOWS-1252 -t UTF-8 in.txt > out.txtHow to convert a fixed-width TXT file to CSV in Excel
rows.page does not parse fixed-width text, and it does not read or write .xlsx files. If your columns are lined up by character position, split them in Excel and save the sheet as CSV:
- Data > From Text/CSV reads delimited text, and its Delimiter list also has a fixed width option.
- In the Power Query editor, Split Column > By Positions breaks each line at the character offsets you enter.
- The legacy Text Import Wizard has a Fixed width mode where you place the column breaks by hand. Turn it on under File > Options > Data > Show legacy data import wizards > From Text (Legacy).
- Save with File > Save As and pick CSV UTF-8 (Comma delimited) so accented characters survive.
How to batch convert TXT to CSV with DuckDB
To convert files in a script, or to handle a file over 1.5 GB in full, run DuckDB in your terminal. Like rows.page, it detects the delimiter and header row of a .txt file:
COPY (SELECT * FROM read_csv('in.txt')) TO 'out.csv' (HEADER);This writes a comma-separated out.csv with a header row. DuckDB rewrites values from their detected types, so 42.50 comes out as 42.5; add all_varchar = true inside read_csv(...) to keep every value exactly as written.
To share the result, push it with curl -T out.csv https://rows.page. Without an account the link lasts 7 days.
rows.page limits and prices
| What | Limit or price |
|---|---|
| Open a file in your browser | Files up to 1.5 GB, $0, no account, nothing uploaded |
| Share a link without an account | $0, files up to 100 MB, link deleted 7 days after creation |
| Free account | $0, 10 datasets kept, last 3 versions |
| Pro | $12/month, 100 datasets, files up to 500 MB, private links |
| Max | $39/month, 1,000 datasets, files up to 2 GB, private links |
Questions
Can I convert a TXT file to CSV without uploading it to a server?
Yes. rows.page converts the file inside your browser tab and only uploads it if you click Share. Opening and exporting is free and needs no account.
What if my TXT file uses pipes or semicolons instead of tabs?
Drop it on rows.page as usual. The sniffer detects comma, semicolon, tab and pipe delimiters, and the CSV export always uses commas.
Does rows.page add a UTF-8 BOM to exported CSV files?
No. CSV exports are comma-delimited UTF-8 without a BOM, with no option to change the delimiter, encoding or BOM. To open one in Excel with accents intact, use Data > From Text/CSV and set File Origin to 65001: Unicode (UTF-8).
Can I open a TXT file from a public URL and export it as CSV?
Yes. Put the URL after rows.page/, as in https://rows.page/https://example.com/data.txt. If the host blocks cross-origin requests, the rows.page proxy fetches up to 100 MB within 30 seconds and stores nothing.
Can I export a TXT file to formats other than CSV?
Yes. The Export menu also saves the current view as Parquet (zstd compression), JSON (an array of objects), JSONL (one object per line) or a Markdown table of the first 1,000 rows.