Text tools
SQL IN Clause Generator & List Formatter
Generate a SQL IN() clause from any list in seconds, paste values one per line, pick a preset (strings, integers, NOT IN, CSV, Python list, JS array), and copy. Trim, dedupe, sort, and wrap the output however your query needs it. Nothing leaves your browser.
Format: 'value', 'value'
Understanding the SQL IN Clause
The WHERE column IN (...) clause lets you filter rows against a fixed list of values in a single condition, it is equivalent to writing multiple OR predicates but far more readable and often better optimised by the query planner.
String values, use single quotes
SELECT * FROM orders
WHERE status IN ('pending', 'processing', 'shipped');Integer values, omit quotes
SELECT * FROM users WHERE id IN (101, 202, 303, 404);
NOT IN, exclude a list
SELECT * FROM products
WHERE category NOT IN ('archived', 'draft');Works identically in MySQL, PostgreSQL, SQL Server, SQLite, BigQuery, and Snowflake, single-quoted string literals are the ANSI SQL standard.
How to Use
1. Paste your list
Copy a column from Excel, Google Sheets, a database result, or any text source. Each line becomes one item.
2. Pick a preset or configure
Choose SQL IN (strings), SQL IN (integers), NOT IN, CSV, Python list, JS array, or dial in wrap + delimiter manually.
3. Copy and use
Hit Copy to Clipboard. Paste directly into your SQL query, script, or config file.
Preset Reference
| Preset | Wrap | Delimiter | Example output |
|---|---|---|---|
| SQL IN (strings) | ' | , | 'a', 'b', 'c' |
| SQL IN (integers) | none | , | 1, 2, 3 |
| SQL NOT IN | ' | , | 'a', 'b', 'c' |
| CSV | none | , | a,b,c |
| Quoted CSV | " | , | "a","b","c" |
| Python list | ' | , | ['a', 'b', 'c'] |
| JS array | " | , | ["a", "b", "c"] |
Common Use Cases
SQL WHERE IN(), ad-hoc queries
Export an ID column from a spreadsheet or BI tool, paste it here, and get a ready-to-paste IN clause for MySQL, PostgreSQL, SQL Server, BigQuery, or Snowflake.
Column to CSV / comma-separated list
Turn a vertical column of values into a single comma-separated line for API payloads, import configs, or spreadsheet COUNTIF formulas.
Python & JavaScript data structures
Generate a Python list literal or a JavaScript array literal directly from a pasted column, ready to drop into code.
Data cleanup before import
Deduplicate and trim a messy list of SKUs, emails, or tags before feeding them into a database, API, or ETL pipeline, the stats bar confirms the final count.