Pipe-delimited to CSV
How to convert a pipe-delimited file to CSV
Open a pipe-delimited file up to 1.5 GB in rows.page and export it as CSV in 2 steps, free and with no signup. rows.page detects the | delimiter in your browser and quotes every field that holds a comma or a quotation mark.
No file handy? Open CO2 emissions by country and year (50k rows, 14 MB).
What is a pipe-delimited file?
A pipe-delimited file, saved as .psv, .txt or .csv, separates columns with the vertical bar | instead of a comma or tab. Database and mainframe exports use it because their text often contains commas, which would otherwise need quoting in almost every field:
id|customer_name|address|balance
101|Smith, John|14 Oak St, Apt 2B|450.00
102|Doe, Jane|The "Gables" Main Rd|1200.50Spreadsheet apps expect commas, so double-clicking the file usually leaves each whole line in column A, and many systems don't know which app opens a .psv file at all.
| Method | Steps | Handles quoted fields |
|---|---|---|
| rows.page | Drop the file on the page, click Export > CSV | Yes |
| Excel | Data > From Text/CSV, set Delimiter to Custom and type |, load, then Save As CSV | Yes |
| DuckDB CLI | Run one COPY ... FROM read_csv(..., delim = '|') command | Yes |
| Text editor find-and-replace | Replace | with , across the file | No |
How to convert pipe-delimited to CSV in rows.page
- Drag the file onto rows.page, or click Paste data, paste the text and click Open. A dragged
.psvfile opens fine, but the file picker doesn't list.psv, so rename it to.txtif you'd rather pick it. - Check the grid: DuckDB's sniffer detects comma, semicolon, tab and pipe delimiters and the header row by itself.
- Click Export and choose CSV.
DuckDB-WASM reads the file inside your browser tab and nothing is uploaded unless you click Share. The CSV is comma-delimited UTF-8 without a BOM, with a header row, and every field containing a comma or a quote is wrapped in double quotes. Text cells starting with =, +, -, @, a tab or a carriage return get a leading apostrophe so spreadsheets don't run them as formulas.
A 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." There is no manual delimiter setting if the sniffer guesses wrong on a malformed file, and no encoding or BOM option on export.
How to open a pipe-delimited file in Excel and save it as CSV
- Open a blank workbook and go to Data > From Text/CSV, then pick your file.
- In the preview, set Delimiter to Custom and type
|. - To keep leading zeros and long ID numbers intact, turn off data type detection in the last dropdown so every column stays Text.
- Check that the columns split cleanly, then click Load.
- Click File > Save As and choose CSV UTF-8 (Comma delimited).
Excel quotes fields that contain commas when it writes the CSV. With type detection on, it turns digit strings into numbers, which drops leading zeros and keeps only 15 significant digits.
How to convert pipe-delimited to CSV with DuckDB
For files over 1.5 GB or batch jobs, run the DuckDB CLI, the same engine rows.page runs in your browser:
COPY (SELECT * FROM read_csv('in.txt', delim = '|')) TO 'out.csv' (HEADER);delim = '|' stops read_csv from guessing the separator, and (HEADER) writes the column names on the first line. DuckDB quotes output values that contain a comma, a quote or a newline. It also rewrites numbers from their detected type, so 450.00 becomes 450.0; add all_varchar = true to keep every value as written.
Why find-and-replace breaks pipe-delimited files
Replacing every | with , in a text editor or with sed only works if no value contains a comma, a quote or a pipe. Take row 101 from the example:
101|Smith, John|14 Oak St, Apt 2B|450.00After the replace, it reads:
101,Smith, John,14 Oak St, Apt 2B,450.00The line now has 5 commas, which any CSV parser reads as 6 columns instead of 4. A real CSV writer splits on | first, sees the comma in Smith, John and writes "Smith, John" in double quotes so the comma stays inside the cell.
How to check the converted CSV
Before loading the CSV into another system, open it in rows.page and compare it with the original:
- The Columns panel shows the number of columns and each column's type, share of empty values, and min and max for numbers and dates.
- The distinct count on your key column ("N values", or "~N values" when estimated) shows whether broken line breaks split records into extra rows.
- The filter
-id:*finds rows with an emptyid, andbalance:>0checks that a number column parsed as numbers. - This SQL query summarizes every column at once:
FROM (SUMMARIZE data)If you filtered out bad rows or hid columns along the way, click Export > CSV again. A filtered view exports every matching row, and a SQL result up to 1,000,000 rows.
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
How big can a pipe-delimited file be in rows.page?
Up to 1.5 GB per browser tab. A bigger file loads the first rows that fit, with a note giving the row count and file size.
Does rows.page upload my file when I convert it?
No. Opening and exporting run in your browser, and nothing is sent to a server unless you click Share or push it with curl -T data.csv https://rows.page.
What if my pipe-delimited file isn't UTF-8?
UTF-16 files with a BOM are decoded ("Read as UTF-16 text."), and other non-UTF-8 files are read as Latin-1 ("Read as Latin-1 text."). A byte from 0x80 to 0x9F, such as a Windows-1252 euro sign, curly quote or dash, makes that read fail with "Couldn't open this data", so convert the file first with iconv -f WINDOWS-1252 -t UTF-8 in.txt > out.txt.
Can I convert a pipe-delimited file to Parquet or JSON instead of CSV?
Yes. The Export menu also saves the 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.
Can I share the converted table with a coworker?
Click Share to upload the file and get a https://rows.page/<id> link. A push can be up to 100 MB on any plan, and without an account the link expires after 7 days; sign in with Google to keep up to 10 datasets on the Free plan.