List Converter
Transform lists between formats - comma-separated, newline, bulleted, numbered, JSON array, SQL IN clause, and HTML.
List Converter tool
Example
Input: 3 lines: apple, banana, cherry - Output Format: SQL IN clause
Result: ('apple', 'banana', 'cherry')
The tool detects 3 items, wraps each one in single quotes (doubling any quote inside) and joins them inside parentheses, ready for a SQL WHERE ... IN query.
- Paste your list into the input area in any supported format (one per line, comma-separated, tab-separated and so on).
- Leave Input Format on Auto-detect or pick the separator yourself.
- Choose an output: newline, comma, semicolon, tab, bulleted, numbered, JSON array, SQL IN clause or HTML list.
- Check the converted list and the number of items detected.
- Click the copy button to copy the converted list.
Converting Lists Between Formats
The List Converter changes a list from one format to another. Paste items one per line, or separated by commas, semicolons or tabs. Then get them back as a comma-separated line, a bulleted or numbered list, a JSON array, a SQL IN clause or an HTML list. Comma-separated is the default output.
Auto-detect picks the separator that appears most often in your input. That works for most lists, but it can guess wrong. A list of "City, State" pairs, one per line, has more commas than line breaks, so each city and state would become a separate item. In that case, set the input format to Newline by hand. Auto-detect also reads a JSON array of simple values, so you can turn JSON output back into lines.
Every item is trimmed and empty items are dropped, so stray spaces and blank lines disappear. If every line starts with a bullet (-, * or •) or a number such as "1." or "2)", the markers are removed first. That way a list copied from a document converts cleanly. The count under the menus shows how many items were found.
The SQL option wraps each item in single quotes and doubles any quote inside, so O'Brien becomes 'O''Brien'. The HTML option escapes <, >, & and quotes. JSON output is a formatted array of strings. To drop repeats or sort the list first, use Remove Duplicate Lines or Sort Lines.
Frequently Asked Questions
Related Tools
Sort Lines
Sort lines of text alphabetically (A-Z or Z-A) with natural number order, by line length, or shuffle and reverse them.
Text and WritingRemove Duplicate Lines
Remove duplicate lines from text while keeping the original order. Supports case-sensitive and case-insensitive modes.
Text and Writing