SQL IN clause generator
Turn a list of values into a SQL IN (…) clause, quoted and with duplicates removed.
Quotes
Missing a feature or found a bug in SQL IN clause generator? Tell me on X (@_andrewtran) or by email.
How to use SQL IN clause generator
- Paste your values, one per line or separated by commas.
- Choose how to quote them and whether to drop duplicates.
- Copy the IN clause from the output pane.
Questions and answers
Is my data sent anywhere?
No. Everything runs in your browser on this device. Nothing you paste is uploaded or stored.
When are values quoted?
On Auto, a list of only numbers is left bare and anything else is wrapped in single quotes. You can also force quotes on or off.
What about a quote inside a value?
It is doubled, the standard SQL way, so a name such as O'Brien stays one value.
Related tools
Subnet calculator
Find the network, broadcast address, host range and mask for any IPv4 address and CIDR prefix.Chmod calculator
Work out Unix file permissions with checkboxes, and convert between octal 755 and rwxr-xr-x.SemVer calculator
Parse a semantic version, compare two versions, check a range and see the next releases.Contrast checker
Check the WCAG 2 contrast ratio of a text colour on a background, with AA and AAA results.