# Json To Sql — REST API endpoint `json-to-sql`

Convert a JSON array of objects into SQL INSERT statements, optionally preceded by a CREATE TABLE. Column types come from the real JSON values, so booleans stay booleans and null becomes NULL rather than the text "null". A nested object or array is stored as JSON text. Identifiers are quoted for the chosen dialect (Postgres, MySQL or SQLite). A single object is treated as one row, and NDJSON is accepted. Nothing is executed against a database.

- Category: data
- MCP server: https://mcp.findutils.com/ (Streamable HTTP, no API keys, 120 req/min per IP)
- REST endpoint: POST https://api.findutils.com/api/tools/json-to-sql/execute (no API keys, 60 req/min per IP)
- Reference page: https://findutils.com/api/json-to-sql/
- Same tool on the other surface: https://findutils.com/mcp/json-to-sql/

## Call the endpoint (verified example)

```bash
curl -X POST https://api.findutils.com/api/tools/json-to-sql/execute \
  -H "Content-Type: application/json" \
  -d '{
    "json": "[{\"id\":1,\"name\":\"Ada\",\"active\":true}]",
    "table": "people",
    "dialect": "postgres"
  }'

# Parameter schema
curl https://api.findutils.com/api/tools/json-to-sql
```

## Input schema

| Argument | Type | Required | Description |
|---|---|---|---|
| `json` | string | yes | A JSON array of objects, a single object, or NDJSON. |
| `table` | string | no | Target table name. Default: "my_table". Default: `"my_table"`. |
| `dialect` | string (postgres \| mysql \| sqlite) | no | Identifier quoting and type names. Default: postgres. Default: `"postgres"`. |
| `create_table` | boolean | no | Emit a CREATE TABLE before the inserts. Default: true. Default: `true`. |
| `batch` | boolean | no | Emit multi-row INSERTs instead of one statement per row. Default: false. Default: `false`. |

Example arguments (verified):

```json
{
  "json": "[{\"id\":1,\"name\":\"Ada\",\"active\":true}]",
  "table": "people",
  "dialect": "postgres"
}
```

Decoded `json` argument (readability only — send it as a string):

```json
[
  {
    "id": 1,
    "name": "Ada",
    "active": true
  }
]
```

OpenAPI 3.1 spec: https://findutils.com/api/openapi.json · Interactive docs: https://findutils.com/api/docs/

## Also an MCP tool

```bash
claude mcp add findutils --transport http https://mcp.findutils.com/
```

Then ask the client to call `findutils:json_to_sql`. Full MCP reference: https://findutils.com/mcp/json-to-sql/

---
Full catalog: GET https://api.findutils.com/api/tools · https://findutils.com/api/ · https://findutils.com/llms.txt
