Home › Text Tools › Comma Separator

Comma Separator

Paste a list with one item per line and get a clean comma separated list, or paste comma separated values and split them back into lines. Pick any delimiter, add quotes, sort and remove duplicates.

Items0
Duplicates removed0
Empty removed0
Output characters0
Advertisement
Advertisement

How to use the Comma Separator

  1. Pick a direction: Lines → comma list, or Comma list → lines.
  2. Paste your items into the Input box, for example a column copied from Excel or Google Sheets.
  3. Choose the delimiters: how to split the input and what to join the items with.
  4. Fine-tune the list with quotes, sorting, case, prefix/suffix, trimming and duplicate removal.
  5. Press Convert, then Copy or Download the result.

Common delimiters and where they are used

DelimiterExample outputTypical use
Comma + spacered, green, blueReadable lists in emails, documents and tags
Commared,green,blueCSV files, URL parameters, spreadsheet import
Semicolonred; green; blueEmail recipient lists, CSV in locales that use a decimal comma
Pipered | green | blueLog files, data exports, regex alternatives
Tabred→green→bluePasting into a single spreadsheet row (TSV)
New lineone item per lineColumns in Excel or Google Sheets, plain text lists

Worked example: a SQL IN list from a spreadsheet column

Suppose you copy these order IDs from a spreadsheet column:

A-1001
A-1002

A-1001
B-2040

With Remove empty items and Remove duplicates ticked, Join with set to Comma (,) and Wrap each item in set to Single quotes, the output is 'A-1001','A-1002','B-2040': three items, one duplicate and one empty line removed. Paste it inside WHERE id IN ( … ) and the query is ready.

Tips for clean lists

  • Quoted values: if a value contains the delimiter, keep it in double quotes ("Smith, John"). The splitter treats it as one item, just like a CSV reader, and doubled quotes ("") become a single quote character.
  • Numbers: the Numeric sort orders 2 before 10, unlike plain A → Z sorting of text. Items that are not numbers go to the end.
  • Hashtags and mentions: add # as a prefix and Space as the delimiter to turn a word list into hashtags.
  • Round trips: use the "Use output as input" button to reverse a conversion and check nothing was lost.

Frequently asked questions

How do I turn a column of data into a comma separated list?

Copy the column from your spreadsheet, paste it into the Input box and keep the Lines → comma list mode. Each line becomes one item and the Output box shows them joined with a comma and a space. Choose Comma (,) if you need no spaces.

Can I convert a comma separated list back into lines?

Yes. Switch to Comma list → lines, or set Split input by to Comma and Join with to New line. Values in double quotes that contain commas, such as "Paris, France", stay together as one item when Respect quoted values is ticked.

How do I put quotes around every item?

Use the Wrap each item in option. Single quotes are handy for SQL IN (...) lists, double quotes for JSON or code arrays, and CSV quoting adds quotes only around items that contain a delimiter, a quote or leading/trailing spaces.

Can I use a delimiter other than a comma?

Yes. Choose semicolon, pipe, tab, space or new line, or pick Custom and type anything, such as ' OR ' or ' | '. Type \n for a new line and \t for a tab in the custom fields.

Does the tool remove duplicates?

Tick Remove duplicates to keep only the first occurrence of each item. Matching is exact and case-sensitive, so use the Change case option first if Apple and apple should count as the same item.

Is my data uploaded anywhere?

No. The conversion happens entirely in your browser with JavaScript. Nothing you paste is sent to a server, so it is safe for internal lists, emails or IDs.

Related tools