How to use
- Paste your list into the List box. Copying a column from Excel or Google Sheets works as is.
- Click one of the Quick presets that matches your goal. All options are set at once.
- If needed, adjust how the list is split and joined, the quotes, numbering, prefix and suffix.
- Copy the result or Download .txt.
Processing order
The tool always works in the same four steps, which helps you predict the result when options overlap.
- Split: cuts the input into items.
Auto-detectsplits on new lines if there is any line break; otherwise it picks the first of tab, comma, semicolon or space that it finds. Splitting on commas also swallows the spaces after each comma.Customsplits on the exact text you type, not a regular expression. - Clean up: trim each item, remove spaces inside items, drop empty items, then remove duplicates, in that order. Removing duplicates keeps the first occurrence and the original order.
- Decorate: quotes go on first, the prefix and suffix are added outside the quotes, and the number goes at the very start.
- Join: items are joined with the output separator and can be wrapped in
( )or[ ]. In a custom separator,\nmeans a line break and\ta tab.
Preset examples
| Preset | Input | Result |
|---|---|---|
| Lines → commas | apple, banana, cherry, a blank line, grape, apple (one per line) |
apple, banana, cherry, grape, apple |
| Commas → lines | a, b, c |
a, b, c (one per line) |
| SQL IN | it's, ok, fine (one per line) |
('it''s', 'ok', 'fine') |
| Hashtags | travel plan, food (one per line) |
#travelplan #food |
| Numbered list | apple, banana, grape (one per line) |
1. apple, 2. banana, 3. grape (one per line) |
Numbering can be 1., 1), (1) or 1 -. With 1 - you get 1 - red, 2 - green and so on.
SQL IN clauses and quote escaping
SQL strings are wrapped in single quotes, and a single quote inside the string is written twice. So it's becomes 'it''s'. The single-quote option follows this rule, so the output can go straight after WHERE name IN . The double-quote option escapes " as "" in the same way, which matches the CSV convention.
For a list of numbers, turn quotes off and only wrap in ( ): entering 1001, 1002, 1003 one per line gives (1001, 1002, 1003). When an application builds queries from user input, use parameter binding instead of this approach. This tool is meant for writing lookup or check queries by hand.
Turning a spreadsheet column into a comma list
When you copy a range of cells from Excel or Google Sheets, rows are separated by line breaks and columns by tabs. A single column is therefore a line-separated list, and Lines → commas turns it into a comma list immediately. A single row comes out as one tab-separated line, which Auto-detect recognizes and handles the same way.
Related tools
To sort the list alphabetically or numerically, use Sort Lines. To drop repeated items first, use Remove Duplicate Lines. For spaces only, try Remove Extra Spaces, and to replace specific text use Find and Replace. Your text is processed in this browser and never sent to a server.