Normalize messy 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.

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 users run 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.

  1. 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.
  2. 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.
  3. The editor content is replaced with the normalised comma list. One + Z reverts if you need the original back.
Format menu open on a Raw Text tab with five newline-separated ids (1001-1005) in the buffer, showing the MINIFY group with Wrap Long Lines, Clean List, and Compress rows
Clean List lives in the Format menu's Minify group, right where Smart Format and Compress live.
Same Raw Text tab after clicking Clean List — the buffer now holds a single line: 1001,1002,1003,1004,1005
One click collapses five lines into a single ready-to-paste comma list.

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

How do I turn a column of values into a SQL IN clause?

Paste the column (one value per line, as copied from a spreadsheet) into Yellorn, open the Format menu, and choose Clean List under Minify. It collapses the values into a compact comma list like 1001,1002,1003 that you paste straight into IN (…).

What list shapes does Clean List accept?

A newline-delimited list, an already-comma-separated list with messy spacing, single-column SQL CLI output (pipe borders and header separators included), a single-column Markdown table, and a bracketed JSON array or Python list literal. All collapse to one compact comma list.

Will Clean List mangle prose or multi-column data?

No. It is deliberately conservative: it rejects multi-column tables and refuses prose or multi-word cells rather than silently mangling them, showing a clear error toast instead. A stray click can't quietly destroy non-list text.

Where do I find Clean List, and can I undo it?

It lives in the editor toolbar's Format split-button menu, under the Minify group. It replaces the editor content with the normalised comma list, and a single Cmd/Ctrl + Z restores the original text.

Try a fix in the editor or browse more articles.