# SQL INSERT generator

> Create escaped SQL INSERT statements from JSON.

[Open tool](https://www.toolcabana.com/vo/sql-insert) · [Developer and data](https://www.toolcabana.com/vo/category/developer-and-data)

Tool ID: sql-insert. Requested language: vo. Description language: en. Complete guide translation: no; untranslated sections use English.

## Overview (en)

SQL INSERT generator turns a JSON array of objects into one multi-row INSERT statement with escaped values. Column names come from all object keys and are quoted for PostgreSQL or MySQL. Strings are single-quoted with quotes doubled, null becomes NULL, booleans become TRUE or FALSE, and nested values are stored as JSON text.

## Supported tasks (en)

Create escaped SQL INSERT statements from JSON.

## Steps (en)

1. Type or paste your source, or load an example.
2. Change the basic settings or open Advanced mode to fine-tune the result.
3. Review and copy or download your result. Pause Live results to run manually. Sources or individual settings above 20,000 characters require an explicit run.

## Settings

- Table name (en; key: table; type: text)
- Identifier quoting (en; key: dialect; type: select): postgresql [en], mysql [en]

## Limitations (en)

Text operations generally accept up to 2,000,000 characters. Individual parsers, generators and formulas apply additional limits shown by their controls.

## Example input

```text
[{"name":"ToolCabana","count":2},{"name":"Example","count":3}]
```

## Privacy and connections (en)

This operation processes its source in your browser. Copy and download are explicit actions; source input is not saved in an account or history.

## Questions (en)

### How do I generate SQL INSERT statements from JSON?

Paste a JSON array of objects, enter the table name and choose PostgreSQL or MySQL identifier quoting. The output is a single INSERT INTO statement with one VALUES row per object.

### How are missing JSON keys handled in the INSERT?

Every key found in any object becomes a column. When an object lacks a key, NULL is written for that column in its row.

### Why is my table name rejected?

The table name must be a simple identifier: letters, digits and underscores, starting with a letter or underscore. Schema-qualified names with a dot are not accepted.

### Where is my input processed?

This operation processes its source in your browser. Copy and download are explicit actions; source input is not saved in an account or history.

### What are the input limits?

Text operations generally accept up to 2,000,000 characters. Individual parsers, generators and formulas apply additional limits shown by their controls.

## Related tools

- [SQL formatter](https://www.toolcabana.com/vo/sql-formatter)
- [Random test data generator](https://www.toolcabana.com/vo/test-data)
- [JSON to TypeScript](https://www.toolcabana.com/vo/json-to-typescript)
- [String escape unescape](https://www.toolcabana.com/vo/string-escape)
