JSON to SQL INSERT
Generate PostgreSQL, MySQL or SQLite INSERT statements from JSON records, preserving numeric tokens and escaping identifiers and strings.
How to use
Paste one object or an array of objects. Columns are the union of first-seen keys; missing values become NULL. Numbers retain their JSON token text. Nested objects and arrays become JSON text in one SQL value rather than separate tables.
Identifiers are quoted for the selected dialect. PostgreSQL uses E strings; MySQL uses UTF-8 hex conversion to avoid SQL-mode-dependent backslash escaping; SQLite uses quoted text or a hex cast for NUL-containing values.
Behavior and limits
The tool does not connect to a database or create a schema. Check target column types and transaction behavior before running generated SQL. Limits: 1,000 records, 63 UTF-8 bytes per identifier and 200,000 input characters.
Questions & answers
Does it execute SQL?
No. It produces text for you to review and copy. No database credentials or connections are used.
Is my input sent to a server?
No. Processing runs in your browser and input is not submitted to an API. Original files and remote databases are not modified.
Other Languages
References
How we make sure
We check this tool with the automated test suites linked below. Example checks are shown in their original language.
- Verification method
- Execute generated SQL and query stored rows to check strings, nulls, nested-value handling and types.
- Comparison reference
- Python sqlite3 execution results.
- Verification scope
- Execution verification covers SQLite fixtures, not every dialect.
Test source and cases (select a file to read it)
-
data-tools.test.js
- JSON-to-SQL executes as intended in SQLite and handles missing, nested and escaped values
These checks cover the listed examples and boundaries, not every possible input. Round trips and checks using the same library are not independent verification.