SQL to JSON Converter

Convert SQL INSERT statements into clean JSON objects in your browser — typed values, multi-table support, pretty or minified.

Paste SQL INSERT statements above to turn them into JSON.

No uploads. Your files stay on your device.

Free forever, no sign-up, no cookies. Buy me a coffee

How it works

Paste SQL INSERT INTO … VALUES … statements — a mysqldump excerpt, a seed file or a few hand-written rows — and each row becomes one JSON object. Column names come from the column list in the statement; if the statement has none, they are taken from a CREATE TABLE in the same paste, and otherwise the columns are named column_1, column_2 and so on. Multi-row VALUES lists, several statements and several tables are all supported: with one table you get a plain JSON array, with more than one you get an object keyed by table name (or force either shape with the Output shape select).

The parser understands single-quoted strings with '' and backslash escapes, double-quoted and backtick-quoted identifiers, line and block comments, NULL, TRUE/FALSE and numeric literals. With “Convert numbers, booleans and NULL” ticked those become real JSON numbers, booleans and null; untick it to keep every value as a string, which is handy for zero-padded IDs and phone numbers.

Everything runs in your browser with plain JavaScript — the SQL is never uploaded, stored or logged, so it is safe for production dumps containing customer data. Use Copy JSON or Download .json to take the result with you.

Frequently asked questions

How do I convert an SQL dump to JSON?

Paste your SQL into the box — every INSERT INTO … VALUES … statement is parsed as you type and each row becomes one JSON object. Column names come from the column list in the statement; if it has none, they are read from a CREATE TABLE in the same paste, and otherwise the columns are named column_1, column_2 and so on. Multi-row VALUES lists and several statements at once are supported, then Copy JSON or Download .json saves the result.

What happens with NULL, booleans, quoted strings and multiple tables?

With "Convert numbers, booleans and NULL" ticked, NULL becomes JSON null, TRUE/FALSE become real booleans and numeric literals become numbers; untick it to keep everything as strings, which preserves zero-padded IDs and phone numbers. Single-quoted strings with '' or backslash escapes, double-quoted and backtick-quoted identifiers, and -- and /* */ comments are all handled. If your paste inserts into more than one table you get an object keyed by table name, and the Output shape select can force a flat array or grouped object instead.

Is my SQL uploaded to a server?

No. The whole conversion runs locally in your browser with plain JavaScript — your SQL is never uploaded, stored or logged, and the page keeps working offline once loaded. That makes it safe for production dumps containing customer records, emails or credentials, and there is no ad wall, signup or row limit.

Report a bug