List converter
This tool can process column-based data and apply various changes (transpose, add prefix and suffix, reverse list, sort list, lowercase values, truncate values) to each row.
About List converter
Reshapes a list of lines into the format you need: trim, deduplicate, lowercase, sort or reverse the items, add a prefix and suffix to each one, join them with a separator and wrap the whole list. Typical output is a comma-separated or SQL-ready list.
When you would use it
- Turning a column copied from a spreadsheet into 'a', 'b', 'c' for an SQL IN clause or a code array.
- Cleaning a list: removing duplicates and blank lines, trimming spaces, sorting.
- Adding quotes, brackets or a URL prefix to every item at once.
How to use it
- Paste the items, one per line.
- Toggle the transformations: trim, remove duplicates, lowercase, sort, reverse, keep line breaks.
- Set the item prefix and suffix, the separator and the list prefix and suffix, then copy the result.
Things worth knowing
- Transformations are applied in a fixed order: lowercase, deduplicate, reverse, sort, trim, remove empty lines, then wrap and join. Deduplication therefore happens before trimming, so 'a' and 'a ' stay two items even with trimming on; paste the trimmed output back in for a second pass if that matters.
- Sorting is alphabetical as text, so 10 sorts before 2. Pad numbers or sort them elsewhere when numeric order matters.
- The separator is inserted between items only; combine it with "Keep line breaks" to get one item per line while still ending each line with a comma.
- Your settings are remembered in this browser, so the tool opens with the last configuration you used.
Frequently asked questions
- How do I make an SQL IN list?
- Set the item prefix and suffix to a single quote each, the separator to a comma and a space, and the list prefix and suffix to ( and ). Lines like a, b, c become ('a', 'b', 'c').
- Why is a duplicate not removed?
- Items are compared exactly after lowercasing but before trimming, so a trailing space or an invisible character makes two items differ. Trim first (run the tool once with only trimming on), then deduplicate in a second pass.