List Converter
Reshape a list for SQL, code or a spreadsheet.
INPUT
CHARS: 0WORDS: 0LINES: 0
OUTPUT
CHARS: 0WORDS: 0LINES: 0
How the List Converter works
Paste a list separated by new lines, commas, semicolons, tabs, spaces or pipes. The input format is detected automatically, or you can choose it. The output joins the items with the separator you pick and can wrap each item in single quotes, double quotes or backticks, then wrap the whole list in parentheses or square brackets.
The SQL IN preset is a common use: a column of IDs from a spreadsheet becomes ('a', 'b', 'c') in one step. Trimming, dropping empty items and removing duplicates are optional.
List Converter examples
Sample input with the default options
Input
apple banana cherry
Result
apple, banana, cherry
When it is useful
- •Building a SQL IN clause from a column of values.
- •Turning a comma separated string into one item per line.
- •Creating array literals for code from a plain list.
- •Preparing tags or keywords in the format a system expects.
Frequently Asked Questions
How do I make a SQL IN list?
Choose single quotes for each item and wrap the list in parentheses. For numeric IDs, leave quoting off.
What happens to quotes inside items?
They are escaped with a backslash when the item is wrapped in the same quote character.
Can it sort the list?
Use the Sort Words Alphabetically tool and run the result through here, or the other way around.
Guides that use this tool
Related tools
- Sort Words AlphabeticallyChoose lines, words or comma separated items and sort them in the order you need.
- Duplicate Line RemoverPaste a list and keep each line once, in the order it first appeared.
- Add Line NumbersNumber every line of a text or a code snippet.
- CSV to JSON ConverterPaste CSV and get an array of JSON objects, or an array of arrays if there is no header.
- Number SorterPaste numbers in any common format and get a clean sorted list.