Free tool · Writing tools
Comma separator
Paste one item per line and get them back in a single line with commas between them. Quotes, other separators and a clean-up of blanks and repeats are one tap away, and the reverse works too.
- Free
- No sign-up
- Runs in your browser
- 4 items
- Items found
- 6
- Empty skipped
- 1
- Duplicates removed
- 1
How to use the Comma Separator
- Under What do you want?, choose Lines to a list or A list to lines.
- Paste your text into the box. The result appears at once.
- Pick the separator, and for a list also choose a quote style under Wrap each item in.
- Tick or clear Trim spaces, Skip empty items and Remove duplicates, then press Copy.
How do I turn a column of lines into a comma separated list?
Paste the column with one item on each line. The tool puts a comma and a space between the items and removes the line breaks. The example has six lines: apples, bananas, cherries, bananas, an empty line and dates. They give this: apples, bananas, cherries, dates
Notice what else happened. The empty line was skipped (1 skipped) and the second "bananas" was removed (1 duplicate). Both clean-ups are on by default because a stray comma or a repeated entry is the usual problem with pasted lists. Clear the ticks to keep every line exactly as it is.
This is handy for filling a search filter, a spreadsheet formula, an email field that takes addresses with commas, or a list of values in code. Press Copy and paste it where it is needed.
Which separator should I use, and how do quotes work?
A comma suits most lists. A semicolon is common where the comma is used as a decimal mark. A pipe or a tab is useful when the items themselves contain commas. A space gives a plain row of words. Something else lets you type any text, such as " - " or " / ".
The same lines come out like this with each choice:
| Setting | Result |
|---|---|
| Comma and space | apples, bananas, cherries, dates |
| Comma only | apples,bananas,cherries,dates |
| Semicolon | apples; bananas; cherries; dates |
| Pipe | apples| bananas| cherries| dates |
| Tab (shown as an arrow) | apples→bananas→cherries→dates |
| Double quotes | "apples", "bananas", "cherries", "dates" |
| Single quotes | 'apples', 'bananas', 'cherries', 'dates' |
Quotes protect an item that holds the separator. If an item is itself in quotes, the quote mark inside is doubled, which is the usual way to write it in spreadsheet and database files. So say "hi" becomes "say ""hi""". Use double quotes for text lists in most programs. Single quotes are common in database queries.
How do I split a comma separated list into lines?
Switch to A list to lines, paste the list and choose the separator it uses. Each item goes on its own line. With Trim spaces on, the space after each comma disappears, so "a, b,c" gives three clean lines.
Quoted items are respected. A comma inside quotes does not split the item, and Remove quotes around items takes the quote marks off. The list "Smith, Ann", Bob, , Cy gives 3 items: Smith, Ann, Bob, Cy. The empty item between the two commas is skipped.
Apostrophes inside words are not mistaken for quotes, so "don't" stays whole. Line breaks inside a pasted list count as spaces, so a list that wraps over several lines is still read as one list.
What if I only need to clean the list, not change it?
If the text only has stray gaps, remove extra spaces fixes those. To strip repeated lines without changing anything else, use remove duplicate lines. If you want the lines joined into running text with no commas at all, remove line breaks does that.
Duplicates are matched exactly, letter for letter, after trimming. "Apple" and "apple" count as different items. Nothing you paste is sent anywhere; the conversion runs in your browser.
Use it with
- Remove Duplicate Lines: clean lists of repeated lines.
- Remove Extra Spaces: clean double spaces, tabs and spaces at line ends.
- Word Counter: count words, characters, sentences.
Questions
How do I convert a column to a comma separated list?
Paste the column under Lines to a list. The items come out on one line with a comma and a space between them.
Can I put quotes around each item?
Yes. Use Wrap each item in and choose double or single quotes.
How do I turn a comma separated list back into lines?
Choose A list to lines, paste the list and pick the separator. Each item gets its own line.
Does it remove duplicates and blank lines?
Yes, both are on by default and the counts show how many were removed. Clear the ticks to keep them.
Can I use a separator other than a comma?
Yes. Choose semicolon, pipe, tab or space, or pick Something else and type your own.
Is my list uploaded?
No. It is converted in your browser and never leaves your device.
How this page was made: the tool's results are computed in your browser by the code on this page; the explanations were drafted with AI help and checked against the tool's own output.