Comma Separator
A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call
Free comma separator tool. Turn a column or list into comma separated values, or split them back into lines, with quotes, custom delimiters and no duplicates.
- Items
- 0
Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.
How to use the comma separator
- Paste your list, one item per line. A column copied from a spreadsheet works perfectly.
- Choose the direction. "List → separated text" joins the lines into one line with separators. "Separated text → list" does the reverse, splitting a line of comma separated values back into one item per line.
- Choose the separator: comma and space, comma, semicolon, pipe, space, tab or new line.
- Optionally wrap each item in double or single quotes.
- Optionally tick "Remove duplicates", "Sort A–Z" or "Trim spaces".
- Copy the result. The comma separator also shows how many items there are.
It works instantly in your browser, with no limit on the length of the list, and nothing you paste is sent anywhere.
What a comma separator does
A comma separator (sometimes called a list to CSV converter or comma delimiter) turns a vertical list:
apples
bananas
cherries
into a single line of comma separated values:
apples, bananas, cherries
It's a small job, but doing it by hand for hundreds of items is slow and error-prone, and a comma separator does it in one paste.
Common uses
- SQL queries: turn a column of IDs into a list for an
IN (…)clause. Choose comma and wrap in single quotes for text values:'A12', 'B34', 'C56'. - Programming: make arrays and lists for JavaScript, Python and other languages, with double quotes:
"red", "green", "blue". - Email addresses: combine a column of addresses into one line to paste into the To or BCC field. Many email clients accept commas; Outlook often prefers semicolons.
- Tags and keywords: turn a list of keywords into the comma separated format many CMSs and shop platforms use.
- Spreadsheets: move data between a column and a single cell.
- Search filters and ad platforms: paste lists of terms, placements or locations.
- Social media and hashtags: combine lists of words; the hashtag formatter adds the # symbols.
Splitting comma separated values into a list
Choose "Separated text → list" to go the other way. Paste apples, bananas, cherries, choose the comma separator, and keep "Trim spaces" ticked to get each item on its own line without stray spaces. This is handy when you receive a long comma separated list and need it as a column in a spreadsheet, or want to check it line by line.
Choosing a separator
| Separator | Typical use |
|---|---|
| Comma and space | Human-readable lists, tags, prose |
| Comma | CSV data, code, most systems |
| Semicolon | Outlook email lists; CSV in regions that use the comma as the decimal mark |
| Pipe (|) | Data where items contain commas |
| Tab | Pasting into spreadsheet cells in one row |
| Space | Command-line arguments, simple word lists |
| New line | Turning one separator into another, via a list |
To change one separator into another (for example, semicolons into commas), split the text into a list first, then join it again with the new separator.
Quotes and items that contain commas
If an item itself contains a comma, such as "Smith, John", a plain comma separated list becomes ambiguous. Wrap each item in double quotes. In the CSV format, a double quote inside a quoted item is written as two double quotes, and the comma separator does this automatically. For single quotes, as in SQL, a single quote inside an item is doubled (O'Brien becomes 'O''Brien'), which is how SQL escapes it.
For full CSV files with many columns, the CSV to JSON converter handles headers and quoting properly.
Cleaning the list as you go
- Remove duplicates keeps only the first time each item appears, so a list of emails with repeats becomes a clean list of unique addresses. It's case-sensitive: "Apple" and "apple" are different items. The remove duplicate lines tool offers more options.
- Sort A–Z orders items alphabetically, sorting numbers naturally (2 before 10). The sort lines tool sorts in other orders too.
- Trim spaces removes spaces at the start and end of each item, which often sneak in when copying from documents or spreadsheets.
- Empty lines are skipped, so blank rows don't create empty items.
To add the same text before or after every item (rather than quotes), use add prefix and suffix to lines, and to remove line breaks entirely from prose, the remove line breaks tool.
Comma separated values in Excel and Google Sheets
To join a column of cells into one comma separated cell in a spreadsheet, use =TEXTJOIN(", ", TRUE, A1:A100), which skips empty cells. To split a cell back into columns, use Data > Split text to columns in Google Sheets, or Data > Text to Columns in Excel, or the TEXTSPLIT function in newer versions of Excel. The comma separator is quicker when the data isn't already in a spreadsheet, or when you also want quotes, sorting or duplicates removed in one go.
Commas in different regions
In much of Europe and South America, the comma is used as the decimal mark (3,5 rather than 3.5). Spreadsheets set to those regions often use a semicolon to separate values in CSV files and formulas instead of a comma. If a list you paste into a spreadsheet ends up in a single cell, or numbers are split in the wrong places, try a semicolon separator in the comma separator.
Lists for email clients
When pasting many email addresses into an email client:
- Gmail and Apple Mail accept commas between addresses.
- Outlook traditionally uses semicolons, although recent versions accept commas too.
- Use BCC for large groups who don't know each other, to protect their privacy.
- Check for duplicates and typos first; the email validator checks addresses one by one.
For large mailings, use an email marketing service instead of a personal inbox, so recipients can unsubscribe and your messages are delivered reliably.
Comma separated values in programming
When you paste a comma separated list into code, check whether each item needs quotes. Numbers usually don't: [1, 2, 3]. Strings do: ["red", "green", "blue"] in JavaScript and Python, or ('red', 'green', 'blue') in SQL. The comma separator's quote option adds the right quotes in one step, and doubles any quotes inside the items so the code stays valid.
Large lists
There's no fixed limit on how many items you can paste. Lists of thousands of lines work, though very large lists may take a moment on older devices. If you're working with a whole database export, a spreadsheet or a script may be better suited, but for everyday lists of up to several thousand items the comma separator is fast and convenient.
Checking the count
The item count shown under the result is a quick check that nothing went missing. If you pasted 120 lines but see 114 items with "Remove duplicates" ticked, six lines were duplicates.
A worked example
A marketing analyst has a spreadsheet column of 120 product IDs and needs them in a database query. She copies the column into the comma separator, chooses "List → separated text", a plain comma, and single quotes, and ticks "Remove duplicates" and "Trim spaces". The result is one line like:
'SKU-1042','SKU-1043','SKU-2001'
The item count shows 114, because six IDs appeared twice. She pastes the list into WHERE sku IN (…) and runs the query.
Later, a colleague emails her a comma separated list of 40 email addresses. She switches to "Separated text → list", pastes it in and gets one address per line, ready to paste into a spreadsheet column.
Need more customers from Google?
This tool is free and runs in your browser. If your business also needs more leads or sales, Google Ads is where people search with their wallet out. DeepRit manages Google Ads for small and mid-size businesses, and only Google Ads. We check your account before we ever get on a call, then fix the structure, the keywords, the tracking and the ads, with month-to-month terms and no long contract. Book a free audit call.
Frequently asked questions
How do I convert a list to comma separated values?
Paste the list, one item per line, into the comma separator, choose "List → separated text" and a comma. Copy the single line of results.
How do I split comma separated text into lines?
Choose "Separated text → list", pick the comma separator, and paste the text. Each item appears on its own line.
How do I add quotes around each item?
Choose double or single quotes in "Wrap each item in". Quotes inside items are escaped automatically.
Can I remove duplicates at the same time?
Yes. Tick "Remove duplicates" to keep only the first copy of each item.
Can I use a semicolon or tab instead of a comma?
Yes. Choose semicolon, pipe, space, tab or new line from the separator list.
Is the comma separator free?
Yes. It's free, needs no sign-up, and works in your browser.
Free PPC audit
See where your ad budget leaks.
We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.