SQL IN Clause Builder
Paste a list of IDs, names or codes, one per line or comma separated, and get a clean SQL IN (...) clause. Strings are quoted and escaped, pure number lists stay unquoted.
How to build a SQL IN clause
- Paste your values, one per line or separated by commas.
- Optionally set a column name, dedupe, sort or force quoting.
- Copy the generated IN (...) clause into your query.
Examples
Names to a quoted IN clause
alice bob carol
IN ('alice', 'bob', 'carol')Numbers stay unquoted
101 102 103
IN (101, 102, 103)
Frequently asked questions
When are values quoted versus left as numbers?
By default the list is auto-detected: if every value is a plain number it stays unquoted, otherwise all values are single-quoted as strings. You can also force either mode.
How are single quotes inside values handled?
They are escaped the SQL-standard way by doubling them, so O'Brien becomes 'O''Brien'. This keeps the clause safe to paste into most databases.
Can it remove duplicates and sort the list?
Yes. Turn on dedupe to drop repeated values keeping the first occurrence, and sort to order them. Number lists sort numerically, text lists sort alphabetically.
Can I add the column name automatically?
Yes. Enter a column such as user_id and the output becomes user_id IN (...), ready to drop into a WHERE clause.
Is my data uploaded anywhere?
No. The clause is built entirely in your browser and nothing is sent to a server, so it is safe for sensitive IDs and identifiers.
Related tools
SQL Query Builder
Build SQL SELECT queries visually. Pick columns, add WHERE conditions, joins, ORDER BY and LIMIT, then copy clean SQL. Runs in your browser.
SQL Formatter
Format and beautify SQL online. Put clauses on their own lines, indent the column list and uppercase keywords. Fast and runs in your browser.
List Comparison
Compare two lists online to find items only in A, only in B, in both, or the combined union. Optional case-insensitive matching. Free and private.
.env to JSON
Convert a .env file to JSON, or JSON back to .env. Parses KEY=value lines, comments, quotes and export. Runs entirely in your browser.
ASCII Table
Full ASCII table for all 128 codes with decimal, hex, octal and binary values, character names and descriptions. Search by code, hex or character.
Aspect Ratio Box Generator
Generate CSS for a responsive aspect-ratio container. Use the modern aspect-ratio property or the padding-top fallback, then copy the ready code.