Comma Separator

Paste one item per line to get a single separated line, or paste a separated line to get a tidy list. Choose the separator and add quotes if you need them.

Worked examples

List to a line

apples pears plums

apples, pears, plums

Choose a plain comma if the destination does not want a space.

Quoted values

red green blue

'red','green','blue'

Single quotes suit many database queries.

Line to a list

"Smith, John", Doe, "Brown, Ann"

Smith, John Doe Brown, Ann

The quoted commas stay inside their items.

About Comma Separator

Many forms and tools want a list on one line with commas between the items, while you have the items in a column. Others give you a long comma separated line and you want it as a list to read or sort. The comma separator does both. Paste one item per line to get a single line, or paste a line to get one item per line, with the separator you choose.

You can use a comma, a comma and space, a semicolon, a pipe, a tab, a space or any separator of your own. Wrap each item in single or double quotes if the place you are pasting into needs them. When splitting, an item in quotes can hold the separator itself, so "Smith, John" stays as one item, and an apostrophe in a word such as don't is not treated as a quote. Spaces around items can be trimmed, empty items skipped and repeats removed.

How to use Comma Separator

  1. Paste your list or your separated line into the box.
  2. Choose the direction: list to one line, or one line to a list.
  3. Pick the separator, and the quotes if you need them. Choose whether to trim spaces, skip empty items or remove repeats.
  4. Copy the result.

Common uses

  • Pasting a column of ids into a search box that wants commas
  • Building the list part of a database query with quoted values
  • Turning a pasted address book field into a readable list
  • Joining tags or keywords into the single line a website asks for

Frequently asked questions

Can I use a separator that is not a comma?

Yes. Choose semicolon, pipe, tab or space from the menu, or choose your own and type it. In your own separator, \t means a tab and \n means a new line.

What happens to commas inside quoted items?

When splitting, an item that starts and ends with matching quotes keeps any separators inside it, so "Smith, John" stays together and the quotes are removed from the result.

Does it keep empty items?

By default empty items, such as the gap in a,,b, are skipped. Untick the skip option to keep them.

Is there a limit on the length of the list?

No fixed limit. Long lists of many thousands of lines are handled quickly.