JSON → SQL INSERT
Convert
Pastes a JSON array (or a single object) and emits a ready-to-run SQL insert. Columns are the union of all keys; rows missing a column get NULL. Strings are single-quote escaped, numbers and booleans become literals, nested objects / arrays get serialized to JSON. Optional `ON CONFLICT` (Postgres / SQLite) or `ON DUPLICATE KEY UPDATE` (MySQL) so you can drop the output straight into a sync job.
INSERT INTO "users" ("id", "name", "email", "verified", "joined")
VALUES
(1, 'Alice', 'alice@example.com', TRUE, '2024-01-15'),
(2, 'Bob', 'bob@example.com', FALSE, '2024-03-22'),
(3, 'Carol', NULL, TRUE, '2024-06-01');Strings are escaped by doubling single quotes — safe for all four dialects.
How to use
- Paste a JSON array of objects (or a single object).
- Set the table name and SQL dialect.
- Toggle multi-row VALUES for a single statement, or off for one INSERT per row. Toggle upsert if you want ON CONFLICT / ON DUPLICATE KEY UPDATE.
Frequently asked questions
- How are nested objects handled?
- Serialized to JSON and inserted as a quoted string. PostgreSQL and MySQL columns of type `JSON` / `JSONB` accept these directly; for SQLite they go in as TEXT.
- What's the difference between multi-row and one INSERT per row?
- Multi-row produces a single `INSERT INTO ... VALUES (…), (…), (…);` which runs much faster on bulk loads. Per-row produces N statements — handier when you want to comment out individual rows or expect failures to be partial.
Related tools
CSS Unit Converter
Convert between px, rem, em, pt, vw, vh, and % using your own base font size and viewport.
JSON ↔ YAML Converter
Convert JSON to YAML or YAML to JSON — pick the indent and copy the result.
Data Size Converter
Convert between bytes, KB, MB, GB, TB — in decimal (1000) or binary (1024).
Roman Numeral Converter
Convert between Arabic numbers and Roman numerals from 1 to 3999.
Number Base Converter
Convert numbers between binary, octal, decimal, and hexadecimal.
Unit Converter
Convert length, weight, temperature, area, volume, speed, and time.