Text › CSV, in your browser
Convert TXT to CSV without breaking your columns
Paste text or drop a file. Pick a separator or let it auto-detect. Get a clean, correctly quoted CSV you can open in Excel, Sheets or any database. Reverse it just as easily.
● Runs on your device. Your file is never uploaded.Built to get the details right
A converter that respects your data
01
Correct quoting
Values with commas, quotes or line breaks are wrapped and escaped to the RFC 4180 standard, so a name like Smith, John never splits your row.
02
Smart delimiter detection
Tab, comma, semicolon, pipe and whitespace files are recognised automatically. Override the guess any time with one dropdown.
03
Excel-ready output
Downloads are UTF-8 with a byte order mark and your choice of CRLF or LF endings, so accented text and columns land correctly.
How to convert TXT to CSV
A text file holds raw lines with no fixed structure. A CSV file turns those lines into a table, where a single character separates each column. The conversion looks simple, yet three details cause most broken files: unquoted values that contain a comma, a separator that does not match what your spreadsheet expects, and an encoding mismatch that garbles accented characters.
This tool handles all three. Drop your file into the pane above, confirm the columns in the live preview, and download. If a column looks wrong, the source almost certainly uses a different separator, so switch it in the Input separator dropdown and the preview updates instantly.
Prefer to do it yourself, or need to script the job for many files? The complete guide to converting TXT to CSV walks through the browser tool, Excel, Notepad++, Python with pandas, PowerShell and Google Sheets, and tells you which method fits your file. To go the other way, use the CSV to TXT converter.
Frequently asked questions
How do I convert a TXT file to CSV?
Paste your text into the converter above or drop the file in, choose the separator (or leave it on auto-detect), check the live table preview, then click Download. The whole process runs in your browser and takes a few seconds.
Is this TXT to CSV converter free?
Yes. Every feature is free with no sign-up, no watermark, and no file limit beyond a sensible 8 MB size for smooth in-browser processing.
Are my files uploaded to a server?
No. The converter is written in JavaScript and runs entirely on your device. Your text never leaves your browser, which makes it safe for confidential data.
What separators are supported?
Tab, comma, semicolon, pipe, single space, runs of whitespace, and any custom character. Auto-detect inspects your first line and picks the most likely one.
Will it handle values that contain commas?
Yes. Any field containing a comma, quote, or line break is wrapped in double quotes following the RFC 4180 rules, so your columns never shift.
Does the CSV open correctly in Excel?
The download is UTF-8 with a byte order mark and CRLF line endings by default, which is the format Excel reads without garbling accented characters. For type-sensitive columns, import through Data then From Text/CSV.
Can I convert CSV back to TXT?
Yes. Use the swap button in the tool, or open the dedicated CSV to TXT converter to rejoin your data with tabs or any custom delimiter.