Comma Separator – Convert a Column to a Comma-Separated List

Convert a column of values into a comma-separated list (or back), with quotes, sorting and de-duplication.

Результат

4 ценности

Оглавление

The comma separator converts a column of values, such as one pasted from Excel or Google Sheets, into a single comma-separated list like apple, banana, cherry. It also works the other way: paste a comma list and choose new line to put each value on its own line. The result updates as you type.

  1. Paste your column, one value per line.
  2. Choose what to join the values with: comma, comma and space, semicolon, pipe, tab, new line or your own text.
  3. Optionally quote each value, wrap the list, trim spaces, remove blanks and duplicates, or sort it, then copy the result.
  • SQL IN clauses: choose single quotes and wrap in parentheses to get ('a','b','c'). Quotes inside values are doubled so the SQL stays valid.
  • Code arrays: double quotes and square brackets give ["a","b","c"] for JSON, JavaScript or Python.
  • Email and tag lists: join addresses or keywords with a comma or semicolon.
  • Splitting: paste a, b, c and join with a new line. Values in double quotes keep their commas.

The input separator is detected automatically (new lines first, then tabs, semicolons and commas), or you can set it yourself. Lists of up to 200,000 characters are supported.

Related text tools: text sorter, diff checker and word counter.

Часто задаваемые вопросы

How do I turn an Excel column into a comma-separated list?

Copy the column in Excel, paste it into the box, and the list appears joined with a comma and space. Choose a different delimiter or add quotes if you need them.

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

Set "Quote each value" to single quotes and "Wrap the list in" to parentheses. The result looks like ('a','b','c').

Can it split a comma-separated list into lines?

Yes. Paste the list and choose "New line" as the delimiter. Values inside double quotes keep their commas.

Can it remove duplicates?

Yes. Tick "Remove duplicates"; you can also remove empty values, trim spaces and sort A to Z, Z to A or naturally.