Text to CSV Converter
Convert structured plain text to proper CSV format with custom delimiters, quoting, and header detection
Paste tab-separated, space-aligned, or pipe-delimited text and get a properly quoted CSV file — with automatic delimiter detection, field escaping, and one-click download. Works great for terminal output, PDF table scrapes, and log files that need to land in a spreadsheet. And everything runs in your browser. Nothing gets uploaded.
How It Works
The tool scans your input to figure out which delimiter separates the columns — tabs, spaces, pipes, or something custom. It then splits each line into fields, wraps any values containing commas or quotes in proper CSV quoting, and joins them back together. The result is RFC 4180-compliant CSV that won't choke your spreadsheet app or import script.
Examples
Tab-Separated Database Export
You ran a SQL query and copied the results from your terminal. The columns are separated by tabs.
id name email
1 Alice Chen [email protected]
2 Bob Rivera [email protected]
3 Carol Osei [email protected]
id,name,email
1,Alice Chen,[email protected]
2,Bob Rivera,[email protected]
3,Carol Osei,[email protected]
Pipe-Delimited Log File with Commas in Values
Server logs often use pipes because the data itself contains commas. The tricky part is the converter needs to quote those comma-containing fields.
timestamp|level|message
2024-01-15 09:32|ERROR|Connection failed, retrying
2024-01-15 09:33|WARN|Slow query, 3200ms
2024-01-15 09:34|INFO|Service restored
timestamp,level,message
2024-01-15 09:32,ERROR,"Connection failed, retrying"
2024-01-15 09:33,WARN,"Slow query, 3200ms"
2024-01-15 09:34,INFO,Service restored
Space-Aligned Table from a PDF Report
Copied a table from a PDF and got columns aligned by spaces. Messy but fixable.
Product Qty Price
Widget A 150 12.99
Widget B 80 24.50
Widget C 320 7.25
Product,Qty,Price
Widget A,150,12.99
Widget B,80,24.50
Widget C,320,7.25
Who Uses This
Converting terminal output or log files into CSV for database imports or test fixtures.
Cleaning up pasted table data from PDFs or reports so it opens correctly in Excel or pandas.
Turning research data from websites or textbooks into CSV for class projects and statistics assignments.
Reformatting status updates or resource lists from emails and docs into spreadsheet-ready CSV.
Common Mistakes
If your text uses tabs but you set the input delimiter to "space," multi-word values like "Alice Chen" get split into separate columns. Use auto-detect or check your source format first.
A field like "Portland, OR" already has a comma. If your tool doesn't quote it, the CSV reader thinks that's two separate columns. This converter handles quoting automatically — but if you're editing the output by hand afterward, don't strip the quotes.
Some rows have 2 spaces between columns, others have 5. Space-delimited mode tries its best, but wildly inconsistent spacing can produce extra empty columns. Tab-separated or pipe-separated text converts much more reliably.
Technical Details
- Processing: 100% client-side — nothing is uploaded
- Browser Support: Chrome, Firefox, Safari, Edge
- Output Format: RFC 4180 compliant CSV
- Max Input Size: Limited only by browser memory (tested with 100,000+ rows)
- Quoting: Automatic for fields containing commas, quotes, or newlines
Frequently Asked Questions
How do I convert a text file to CSV?
Paste the contents of your text file into the input box, select the delimiter your text uses (tabs, spaces, pipes, etc.), and click Convert. The tool generates a properly formatted CSV you can download or copy. No software to install.
Can I convert tab-separated text to CSV?
Yes. Set the input delimiter to "Tab" (or leave it on auto-detect — tabs are recognized automatically). The tool replaces tabs with commas and adds quoting where needed. Works great for data copied out of terminals, databases, or TSV files.
Is my data safe when I use this converter?
Your data stays in your browser the entire time. There is no server upload, no API call, no analytics on your input. The conversion happens using JavaScript running on your device. Close the tab and everything is gone.
What if my text has commas already in it?
The converter automatically wraps fields containing commas in double quotes, following the CSV standard (RFC 4180). So a value like "San Francisco, CA" becomes a single quoted field, not two separate columns. You don't need to do anything special.
Can I use a custom delimiter for the output?
Yes — you can change both the input and output delimiters. If you need semicolon-separated output (common in Europe where commas are decimal separators), just type a semicolon in the output delimiter field. Same goes for pipes, tildes, or anything else.