Text to CSV

Reshape raw text into CSV with any delimiter — comma, tab, newline.

Runs on your deviceFreeNo sign-up
Runs in your browser
Loading tool…

Designed to run in your browser. See the privacy policy.

About Text to CSV

This text to CSV converter reshapes loosely structured text into proper comma-separated values. Each line of input becomes one CSV row, and you tell the tool what separates the columns: runs of whitespace, commas, tabs, semicolons or a custom string of your own. It is useful for terminal output such as ls -l or ps, columns copied out of a PDF or web page, log lines, or a list pasted from a chat.

The output is always standard comma-separated CSV. Any field that contains a comma, a double quote or a line break is wrapped in double quotes with inner quotes doubled, so it opens cleanly in a spreadsheet. The text is processed on your device as you type.

How to use

  1. Paste your text into the text input box, one row per line.
  2. Pick the "Input column delimiter": Whitespace, Comma, Tab, Semicolon or Custom.
  3. If you chose Custom, type the separator into the "Custom delimiter" box. It can be more than one character, such as " | " or ::.
  4. Turn on "Quote all fields" if the program you are importing into expects every value in quotes.
  5. Copy the CSV output, or download it as output.csv.

FAQ

How does the Whitespace option split lines?+
Leading and trailing spaces are removed, then the line is split on any run of spaces or tabs, so aligned columns with uneven padding come out cleanly. The catch is that a value containing a space, such as a full name, is split into two columns. Use Tab or a custom delimiter for data like that.
Does it understand quoted values in my input?+
No. The input is split literally on the delimiter you pick, so a comma inside "Smith, John" still starts a new column. If your input is already valid CSV with quoted fields, a dedicated CSV parser such as the CSV to JSON tool will read it correctly.
What if rows have different numbers of columns?+
Each line is converted on its own, so rows keep however many fields they had. The tool does not pad short rows, and most spreadsheets will simply show the missing cells as empty.
What happens to blank lines?+
Blank lines at the end of the input are dropped, unless Quote all fields is on, in which case they become empty quoted rows. Blank lines in the middle are kept as empty rows, so you may want to remove them first if your import does not expect them.
Can I output tab- or semicolon-separated values instead?+
Not with this tool. The delimiter setting only controls how your input is split; the output is always comma-separated.