← All tools

JSON to SQL Generator

Generate INSERT statements from JSON arrays locally in your browser.

This tool runs entirely in your browser. Your input is never uploaded.

0 = all rows
JSON input
SQL output

JSON to SQL Generator

Generate INSERT statements from JSON arrays locally in your browser.

Input format

Paste a JSON array whose items are objects, or use Upload file to choose a .json file from your device. For example:

[
  {"id": 1, "name": "Alice", "active": true},
  {"id": 2, "name": "Bob"}
]

The generator combines fields in the order they first appear. If a later object does not have a field, its value is emitted as NULL. Arrays and nested objects are serialized as JSON strings so they can be inserted into a text or JSON column.

SQL options

Choose PostgreSQL, MySQL, or SQLite, then enter a table name such as users or public.users. Identifiers are quoted for the selected dialect, and quotes inside identifiers are escaped safely. Strings use SQL single-quote escaping; MySQL also escapes backslashes. Booleans use TRUE/FALSE for PostgreSQL and SQLite, and 1/0 for MySQL.

The batch size controls how many rows go into each INSERT statement. Set it to 0 to generate one statement for all rows, or use a positive number to split a large import into several statements.

Privacy and limits

Parsing and conversion happen entirely in your browser. Nothing is uploaded or sent to a server. Input is limited to 1 MB.

Related tools

A growing collection of browser-only tools. Your data stays on your device whenever the browser can handle the task.