Convert a Column to a Comma-Separated List

Turn a column of lines into a comma (or other) separated list, or split a list back into lines.

Input

Output

4 items
Words 4Characters 24Without spaces 21Sentences 1Lines 4Paragraphs 1Reading time < 1 min

About Comma-Separated List

Copied a column out of a spreadsheet and need it as one line? Paste it here to get item1, item2, item3, ready for an SQL IN clause, a config value or a tag field. Wrap each item in single or double quotes with one click.

Switch to List → lines to go the other way and split a comma-separated string into one item per line. Everything is converted in your browser; your data is never uploaded.

How to use it

  1. Paste one item per line, or a separated list if you are splitting it.
  2. Pick the direction, the separator (comma, semicolon, pipe, tab, space or custom) and any quotes.
  3. See the converted list on the right, with the number of items.
  4. Copy it or download it as a .txt file.

Frequently asked questions

How do I make a list for an SQL IN clause?

Paste your values one per line, keep the comma separator and set Quotes to single. You get 'a', 'b', 'c' ready to drop inside IN ( ).

Are blank lines and stray spaces kept?

No. Each item is trimmed and empty items are skipped in both directions.

Can I control the space after each comma?

Yes. Untick Space after separator for a compact list like a,b,c.

Related tools