Normalize copy-pasted lists and table columns with Clean List
Clean List turns any copy-pasted list shape — newline-delimited, comma-padded, SQL table column, Markdown column, bracketed array — into a single compact comma list, ready for SQL, code, or anywhere else.
What Clean List does
Clean List recognises the most common “list-shaped” text you end up with after copy-pasting from a spreadsheet, a terminal, a Markdown table, or a SQL query result, and collapses it into a single compact, comma-separated line:
- One item per line — a newline-delimited list (from a spreadsheet column or a grep output).
- Padded comma list — values already comma-separated but with inconsistent spacing or trailing commas.
- Single-column SQL table output — the kind you get from
SELECT id FROM usersrun in a psql / MySQL CLI, complete with pipe borders and header separator lines. - Single-column Markdown table — a
| value |column. - Bracketed array — a JSON array or a Python list literal, stripped to just the values.
The result is a compact comma list — no brackets, no spaces, no trailing commas — that you can paste directly into a SQL IN (…) clause, a config value, or anywhere else.
Clean List is deliberately conservative: it rejects multi-column tables (a two-column id,name CSV or pipe table) and refuses prose or multi-word cells rather than silently mangling them, so a stray click can't quietly destroy non-list text — you get a clear error toast instead.
How to use it
- Paste the messy list into the Yellorn editor. The format does not matter — Raw Text works fine, or Yellorn will auto-detect if it looks like JSON or CSV.
- Open the Format menu in the editor toolbar (the split button whose primary action is Smart Format) and choose Clean List under the Minify group.
- The editor content is replaced with the normalised comma list. One ⌘ + Z reverts if you need the original back.
Common use cases
Build a SQL IN clause from a spreadsheet column
Copy a column of ids from Excel or Google Sheets (you get one id per line), paste into Yellorn, click Clean List, and paste the result into your query:
-- Before (copied from spreadsheet): 1001 1002 1003 1004 -- After Clean List: 1001,1002,1003,1004 -- Ready to paste: DELETE FROM orders WHERE id IN (1001,1002,1003,1004);
Tidy up psql or MySQL CLI output
Running a quick SELECT in the terminal gives you a formatted table. Clean List strips the borders and header:
-- Before (psql output): user_id --------- 42 87 101 (3 rows) -- After Clean List: 42,87,101
Flatten a JSON array into a comma list
// Before: ["alpha", "beta", "gamma", "delta"] // After Clean List: alpha,beta,gamma,delta
Related
Where to go next
Try a fix in the editor or browse more articles.