List converter

What is a List Converter?

Developers and analysts constantly reshape lists: turning a column copied from a spreadsheet into a SQL IN clause, adding quotes and commas to make a JavaScript array, sorting and removing duplicates from IDs, or joining lines into one comma-separated string. This list converter applies those transformations to every line at once.

How to use it

  1. Paste a list, one item per line, for example a column copied from Excel.
  2. Choose transformations: prefix, suffix, wrap, sort, reverse, lowercase, truncate, remove duplicates or join.
  3. Copy the result.

Example: spreadsheet column to SQL

Input:

1042
1043
1050

With prefix ', suffix ', and joined on one line:

'1042', '1043', '1050',

Remove the final comma and wrap it: SELECT * FROM orders WHERE id IN ('1042', '1043', '1050');

Other common recipes

  • JavaScript or JSON array: wrap each item in double quotes, separate with commas, add square brackets.
  • Markdown list: prefix each line with - .
  • Clean an email list: lowercase, trim, sort and remove duplicates.
  • Transpose: turn a column into a row of comma-separated values for pasting into another tool.

Tips

  • Trim whitespace first; trailing spaces make apple and apple look like different items.
  • Sorting is alphabetical, so 10 comes before 9; pad numbers or use numeric sort if available.
  • For SQL, escape single quotes inside values by doubling them.

Frequently Asked Questions

How do I turn a column into a comma-separated list?

Paste the column, choose to join lines with a comma and copy the single-line result.

How do I build a SQL IN clause from a list?

Add a single quote prefix and a quote plus comma suffix to each line, join them and wrap the result in IN ( ).

Why does sorting put 10 before 9?

Alphabetical sorting compares characters, and 1 comes before 9. Use numeric sorting or pad numbers with zeros.

Can I remove duplicates?

Yes. Enable duplicate removal, ideally after trimming and lowercasing so variations are caught.