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.

.csv.tsv
Drop a file here
Stays in your browserUp to 1.5 GB

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.

Common TXT layouts and how to convert them
What is in the TXTExample lineHow to convert it
Delimited text (tab, pipe, semicolon, comma)101|Alice|NL|42.50Drop on rows.page and export as CSV, or run DuckDB read_csv
Fixed-width columns101 Alice NL42.50Excel: legacy Text Import Wizard (Fixed width) or Power Query Split Column > By Positions
Free textOrder 101 placed by AliceExtract the fields with a script first; it is not a table yet

How to convert a delimited TXT file to CSV in rows.page

  1. Drop the .txt file on rows.page, choose it from your computer, or click Paste data, paste the text and click Open.
  2. rows.page reads .txt as CSV, and DuckDB's sniffer detects the delimiter (comma, semicolon, tab or pipe) and the header row. There is no manual delimiter setting.
  3. 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.
  4. Optionally clean the rows with a filter such as country:NL, price:>20 or -name:* (is empty), or with SQL against the table data, for example SELECT DISTINCT * EXCLUDE (__rid) FROM data to drop duplicate rows.
  5. 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 0x80 to 0x9F makes the Latin-1 read fail, and rows.page shows Couldn'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:

bash
iconv -f WINDOWS-1252 -t UTF-8 in.txt > out.txt

How 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:

sql
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

WhatLimit or price
Open a file in your browserFiles 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.