About JSON to SQL Converter
This tool converts JSON data — especially an array of objects, like rows exported from an API — into SQL INSERT INTO statements ready to run against a database. It supports MySQL, PostgreSQL, SQLite, and SQL Server identifier quoting styles, can generate either one multi-row insert or a separate statement per row, and can optionally generate a starter CREATE TABLE statement with column types inferred from your data. All conversion happens locally in your browser; your data is never uploaded to a server.
How Values Are Escaped, and a Note on Column Types
Every string value is escaped by doubling any single quote it contains (e.g. O'Brien becomes O''Brien) — this is the standard, ANSI SQL-compliant way to escape a quote inside a string literal, and it's supported by every major database. Numbers are written unquoted, null/missing values become SQL NULL, and booleans follow each dialect's convention (TRUE/FALSE for PostgreSQL, 1/0 for MySQL, SQLite, and SQL Server). Nested objects or arrays within a JSON value are stored as an escaped JSON text string, since a plain SQL column can't hold nested structure directly. If you enable Include CREATE TABLE, column types are inferred from your sample data (e.g. VARCHAR(255) for short text, INTEGER for whole numbers) — treat this as a reasonable starting point to adjust, not a guaranteed-correct schema, since a single JSON sample can't capture every constraint your real table might need.
Send Feedback
For any questions, bug reports, or feature requests, please use the form below to send us a message.