Convert MySQL to JSON Online | Free & Secure
Convert MySQL dump files and INSERT statements to JSON online. Supports MySQL syntax, multiple statements, and large files, securely client-side.
Paste MySQL INSERT statements or upload a mysqldump .sql file, and this tool turns every row into a JSON object inside one array. Backtick-quoted table and column names are unwrapped, extended INSERTs that pack many (…),(…) row tuples into one statement are split into separate objects, and CREATE TABLE or LOCK TABLES lines in a dump are skipped. Parsing runs in your browser, so your database rows are never uploaded.
You May Also Need
How to Convert MySQL to JSON
- 1
Paste or upload your dump
Paste INSERT statements or upload a .sql file created by mysqldump. Export with --complete-insert so each INSERT carries its column names.
- 2
Click "Convert to JSON"
Only INSERT INTO statements are read; table definitions, LOCK TABLES lines, and other parts of the dump are ignored.
- 3
Check the row count
The output header shows how many rows and statements were parsed, and every row from every statement sits in one JSON array.
- 4
Copy or download
Copy the array or download it as a .json file; switch to compact output when you need a single-line payload.
References
- MySQL Reference Manual
The official MySQL documentation covering INSERT statement syntax, data types, and dump file structure.
- RFC 8259 — JSON
The IETF specification for the JSON data interchange format produced by this converter.
- MDN — JSON.parse()
Web API reference for parsing JSON strings into JavaScript objects after conversion.
Related Tools
SQL to JSON
Convert generic SQL statements and queries into structured JSON.
JSON Formatter
Beautify and validate the JSON array produced from your MySQL data.
JSON to CSV
Turn the converted JSON rows into a CSV spreadsheet file.
Excel to JSON
Convert Excel spreadsheets into JSON for the same data pipeline.
Frequently Asked Questions
- Why are my keys col_1, col_2 instead of column names?
- mysqldump writes INSERT statements without a column list unless you pass --complete-insert. Without one, values are numbered col_1, col_2, and so on; re-export with --complete-insert, or add the column list yourself, to get real column names as keys.
- Does it handle mysqldump's extended INSERT format?
- Yes. By default mysqldump groups many rows into a single INSERT ... VALUES (...),(...),(...); statement, and each tuple becomes its own JSON object.
- How are quotes and backslashes inside strings handled?
- MySQL dumps escape quotes with a backslash, and \' and \" are turned back into plain quotes. Other backslash sequences, such as \n, are kept as written.
- How are NULL values and numbers handled?
- NULL becomes JSON null and unquoted numbers become JSON numbers. Quoted values stay strings, so '42' remains the string "42".
- Does it support large dumps?
- It handles reasonably large files, but performance depends on your browser's memory because conversion runs entirely client-side.
- Is my MySQL data sent to a server?
- No. All parsing and conversion happen locally in your browser, so your database data never leaves your device.