Developer Lists

Text to CSV converter

What to do

Transformed in your browser · nothing is uploaded

Local · no quoting, use JSON to CSV for that
Advertisement
320 × 100

Joins a column of lines into one delimited row, or splits a row back into lines, trimming values and dropping empty ones. It is a joiner rather than a CSV writer: nothing is quoted, so the separator has to be a character your values do not contain.

How to use the text to csv converter

1 Paste one value per line, or a delimited row to split.
2 Set the separator — a comma unless your data contains commas.
3 Lines to one CSV row joins; CSV row to lines splits.
4 Copy the row into your file or query.

The gap between this and real CSV shows up the moment a value contains the separator. Three lines reading alpha, Smith, John and charlie join into alpha,Smith, John,charlie, and splitting that back gives four values rather than three — nothing in the row records that one of those commas was part of a name. A real CSV writer would produce alpha,"Smith, John",charlie and a real parser would read the quotes back off. This does neither, deliberately: for a plain list of simple values the quotes are noise, and for anything else you want a tool that understands them.

So it is worth knowing where the line is. Under RFC 4180 a value has to be quoted if it contains the separator, a double quote or a line break, and a double quote inside a quoted value is written twice. Once your data needs any of that, use the JSON to CSV converter instead. One more thing that catches people: a comma is not universal. Spreadsheets in countries that use a comma as the decimal mark save their CSV with semicolons, so a file that looks broken in one locale is usually fine: put a semicolon in the separator field.

Questions

No. It joins and splits, nothing more. Use the JSON to CSV converter when values need quoting.

MDN, working with strings
Advertisement
300 × 250
Was this tool any good?
Internal signal only · I use it to find the tools worth rebuilding