From API response to IN clause
You have a JSON array — an API response, a log extract, a config file — and you need to look those records up in the database. This tool takes the array and produces col IN ('a', 'b', 'c') directly. It accepts plain arrays like ["a", "b"] or [1, 2, 3], arrays of objects (pick which key to extract), and the common {"ids": […]} wrapper with a single array property. Values are escaped, deduplicated and optionally chunked; nested objects, arrays and nulls are skipped with a count — you will never see [object Object] in your SQL.
If your list lives in a spreadsheet rather than JSON, the CSV to SQL IN Statement tool does the same job for CSV columns.
How to convert a JSON array to SQL
- Paste the JSON array. Parse errors show immediately, with the position where parsing failed.
- For arrays of objects, choose the key to extract from the dropdown.
- Adjust quoting, dedupe, the optional column name and chunk size.
- Copy the SQL — it updates live as you type.
Why the details matter
A hand-built IN list fails in predictable ways: an unescaped apostrophe in a name breaks the statement, quoted numbers against an integer column dodge the index, and Oracle rejects any list past 1000 items with ORA-01795. The options here exist to head off exactly those failures — auto quoting matches the value type, and the 1000 chunk setting splits long lists into multiple IN groups joined with OR. For genuinely huge lists, consider loading the values into a temp table instead. And if the JSON itself looks mangled, run it through the JSON Formatter first.