Extract data from SQL INSERT statements and convert it to JSON format. Ideal for recovering data from dumps or migrating to NoSQL.
Click "Convert" to generate JSON
Extracting data from database dumps or SQL scripts doesn't have to be a manual nightmare. Our SQL to JSON Converter parses your INSERT statements and transforms the values into structured JSON objects. This is essential for developers migrating legacy data to NoSQL databases, building REST API responses, or simply inspecting data in a human-readable format.
Relational data (rows/columns) often needs to be consumed by modern web applications or document stores (like MongoDB or Firestore). Instead of writing custom scripts to parse your SQL dumps, this tool allows you to:
INSERT INTO table (...) VALUES ...).(1, 'a'), (2, 'b') into an array of objects.INSERT statement.INSERT statement with specified columns (e.g., INSERT INTO users (id, name) VALUES...).We treat SQL as a structured language, not just string manipulation. Here is how we ensure accuracy:
'value' and standard SQL escaping ('' for a single quote).TRUE, FALSE, 1, and 0 are mapped to JSON booleans where appropriate.NULL keywords become null (not string "null").While powerful, this tool is designed for standard data dumps. Be aware of:
0x... values or binary blobs may not convert cleanly to JSON strings without encoding (e.g., Base64), which we do not currently perform.NOW() or UUID(), we treat them as strings because we cannot evaluate them without a running database.INSERT INTO t (col1, col2) to map values correctly. We cannot guess column names from values alone.NULL?Yes! SQL NULL values are converted to native JSON null.
This tool is specifically designed for INSERT statements. It does not execute SELECT queries. If you have a SELECT result, export it as CSV and use our CSV tool (or convert CSV to JSON).
e.g., INSERT INTO users VALUES (1, 'Alice'). Currently, this is not supported because the tool doesn't know the column names. You must specify columns: INSERT INTO users (id, name)....
Since processing happens in your browser, the limit is your available RAM. Text files up to 10-20MB usually process instantly. Larger files may freeze the browser tab temporarily.