Convert TXT to CSV

Paste a delimited text export or drop the .txt file and get a CSV back, made on this device.

Converts a delimited .txt file to CSV: the cells in a tab, semicolon, pipe or space-separated text export are read, and a comma-separated file is written, so Excel opens it in columns instead of one long column. It is free, needs no account and adds no watermark, and your data is not uploaded: what you paste and the files you drop are converted by code in this tab, which matters for a bank statement or a lab export.

Drop a .txt file to turn into CSVor click to choose a file.
    Working…

    Done

    Free, no ads. Support StayPut

    Your files are processed on this device and never sent to a server. Reload the page to clear everything from memory.

    Why Excel shows a .txt export as one column: Excel splits a file into columns by the separator its own settings expect, and a text file from a bank, a database or an instrument often uses a tab, a semicolon, a pipe or a few spaces instead. Excel sees no separator it knows and puts each whole line in column A. A CSV uses commas, with quotes around any cell that holds a comma, so every program reads it the same way.

    Worked example. A card statement saves as a .txt with tabs between the cells:

    date payee note amount 2026-10-02 Corner Cafe lunch, two people 18.40 2026-10-03 Books "R" Us gift 42.00

    Paste it and press Convert to CSV. The page says it looks tab-separated, and the result is:

    date,payee,note,amount 2026-10-02,Corner Cafe,"lunch, two people",18.40 2026-10-03,"Books ""R"" Us",gift,42.00

    The comma in "lunch, two people" and the quote marks in Books "R" Us are kept inside their cells by quoting, so they do not add columns. A cell that was quoted in the .txt, with a line break inside it, stays one cell. The first 20 rows are shown as a table before you download, so you can check the columns line up.

    For text laid out in aligned columns with spaces, as many reports and instrument logs are, set the separator to “Runs of 2 or more spaces”: a single space stays inside a cell, so Corner Cafe is one cell, and a gap of two or more spaces starts the next. Choose “Any spaces or tabs” when every space should split. The BOM option, on by default, lets Excel read accented letters correctly.

    Going the other way, CSV to TXT writes tab-delimited text. If your data is JSON rather than delimited text, use JSON to CSV, and CSV to JSON turns a CSV into JSON.

    How it works

    1. Paste the text into the box, or drop the .txt file. The page tells you which separator it found.
    2. If it guessed wrong, set the separator under Options. Keep the output on Comma (.csv).
    3. Press Convert to CSV, check the preview table, then copy the CSV or download the .csv file.

    In your browser, not on a server

    A small parser written for this page, with no library, reads your text in a background worker in this tab. JSON is read with the browser’s own JSON parser, and one object per line is accepted too. CSV is read by a parser that follows RFC 4180: quoted values, a doubled quote for a quote, and line breaks inside quotes; the delimiter is detected from the first lines unless you choose one. Text separated by tabs, pipes, semicolons or runs of spaces can be rewritten with another delimiter, using the same parser and, for spaces, a reader that keeps a single space inside a cell. The result is written in the tab, with quoting added only where a value needs it and, if you leave it ticked, a UTF-8 byte-order mark at the start so Excel reads the letters correctly.

    Compared with upload-based tools: Online converters make you paste or upload the data to their server, and customer lists and exports are often exactly the data you should not hand over. Here what you paste and any file you drop is converted on your device and never sent anywhere, and the limit is your device’s memory (phones hold less).

    Verify it yourself. Give the page a short while after one visit to save itself for offline use, then turn off Wi-Fi or switch to airplane mode and run the tool again. Or open your browser's developer tools (F12, or Cmd-Option-I on a Mac), pick the Network tab, and watch it while you convert. The panel above does the same count for you.

    Questions

    How do I convert a TXT file to CSV?

    Paste the text into the box or drop the .txt file, check the separator the page found, and press Convert to CSV. Copy the result or download it as a .csv file. The first 20 rows are shown as a table first, so you can see whether the columns came out right.

    Why does Excel open my .txt file as one column?

    Because the file uses a separator Excel did not expect, such as a tab, a semicolon, a pipe or a run of spaces, and Excel then puts each whole line in the first column. Converting it to CSV writes commas between the cells and quotes around any cell that contains a comma, so Excel splits it into columns when you open it.

    My .txt is ordinary writing, not a table. What will I get?

    One column with one line of text per row. This page splits delimited data into cells; it is not an OCR or text-extraction tool and does not find a table inside prose. If the text should have columns, set the separator that your file really uses.

    Can it split columns that are lined up with spaces?

    Yes. Choose “Runs of 2 or more spaces” and each gap of two or more spaces starts a new cell, while a single space stays inside the cell. “Any spaces or tabs” splits on every space instead. Text laid out in a fixed-width grid with only single spaces between columns cannot be split reliably, and the page will not guess.

    Do cells that start with = + - or @ run as formulas?

    They can. Excel may treat a cell that starts with one of those characters as a formula when it opens the CSV, so look over a file from a source you do not trust before you open it. The page shows the same note under the result and writes your cells as they are, without changing them.

    Is my file uploaded?

    No. The text you paste, or the file you drop, is read and rewritten by code running in this tab, in the background so the page stays usable. A file can be up to 200 MB; a phone may run out of memory on a smaller one, and the page says so instead of giving a half result.

    More PDF tools

    Other conversions