Convert a Column to a Comma Separated List
Paste a column of values, one per line, and this tool joins them into a single delimited list. It splits on any line ending, trims each value and drops blank lines by default, then optionally wraps every value in quotes before joining with the separator you choose. A swap button reverses the process and breaks a delimited list back into a column, one value per line.
How to convert a column to a comma separated list
- Paste your values into the top box, one value per line.
- Open the Join with menu and choose a separator: comma and space, comma, semicolon and space, pipe, space, or tab.
- Tick Wrap in quotes if you need each value quoted, then pick a double, single, or backtick quote character.
- Leave Trim spaces and Remove blank lines on to tidy the values, or untick them to keep the input exactly as pasted.
- Read the joined list in the lower box and click Copy, or Download to save it as list.txt.
- Click the swap button to flip direction and split a delimited list back into a column.
Examples
Join names into a list
Ada Bob Cleo
Ada, Bob, Cleo
Quote values for a SQL IN clause
red green blue
"red", "green", "blue"
Ignore blank lines and stray spaces
apple banana cherry
apple, banana, cherry
Frequently asked questions
How does this turn a column into a comma separated list?
It splits your text on every line break, handling Windows CRLF, old Mac CR and Unix LF endings alike. By default it trims whitespace around each value and skips empty lines, optionally wraps each value in your chosen quote character, then joins the remaining values with the delimiter you selected.
Which separators can I choose?
The Join with menu offers comma and space, a bare comma, semicolon and space, pipe, a single space, and tab. Comma and space is the default because it reads well in prose, while a bare comma or tab suits pasting into spreadsheets and code.
Can I wrap each value in quotes?
Yes. Tick Wrap in quotes and every value is surrounded by the quote character you pick: double, single, or backtick. This is handy for building a SQL IN list, a JavaScript array, or any code that expects quoted strings. The quotes are added before the delimiter joins the values.
Can I split a list back into a column?
Yes. Click the swap button and the tool reverses direction, taking a delimited list and putting one value on each line. In reverse mode it splits on the chosen delimiter, trims each piece, and drops empty results, so a stray trailing separator does not leave a blank line.
What happens to blank lines and extra spaces?
With Trim spaces on, leading and trailing whitespace is stripped from each value, and with Remove blank lines on, empty lines vanish entirely. Turn either option off to preserve the original spacing or keep placeholder blank lines in the output.
Is there a limit on how many values I can paste?
There is no fixed cap. The conversion runs in your browser, so the practical limit is your device's memory. Thousands of lines convert instantly, and the character count under the output shows how large the result is.
Will it keep duplicate values?
Yes. This tool joins whatever values you paste and does not remove duplicates. If you need a unique list, remove duplicate lines first with a dedup tool, then paste the cleaned column here.
Does the swap reuse the same delimiter?
It uses the delimiter shown in the menu. When you swap into reverse mode the label changes to Split on, and the list is broken apart wherever that separator appears. Choose the separator that matches the list you are pasting in.
Is my data private?
Yes. Everything happens locally in your browser and nothing is sent to a server, so pasted values, names or IDs never leave your device.
Learn more
- Turning a column into a list for SQL, CSV and code
Practical ways to convert a stacked column of values into a comma separated list for SQL IN clauses, arrays and CSV rows without breaking the syntax.
Related tools
Remove Line Breaks
Remove line breaks and paragraph breaks from text online. Flatten copied text into one line, keep spaces tidy, then copy the result. Free and private.
Sort Lines
Sort lines of text alphabetically or numerically online. Reverse the order, ignore case, and remove duplicate lines, then copy the result. Free and private.
Remove Duplicate Lines
Remove duplicate lines from text online and keep the first of each. Options for case sensitivity and trimming whitespace. Free, instant, and private.
Find and Replace
Find and replace text online with literal or regex search, case sensitivity, and replace first or all. See a live count of changes. Free and private.
Acronym Generator
Turn any phrase into an acronym from the first letter of each main word. Skip small words like the and of, keep them, or add dot separators.
Add Line Numbers
Add line numbers to any text online. Set the start value, step, and separator, pad numbers to align, and copy or download the result. Free and private.