SQL to JSON Converter
Parse a SQL SELECT or INSERT statement and turn the result set into a JSON array of objects. Useful for snapshotting data and feeding BI tools.
Output will appear here…Convert SQL INSERTs back into JSON
Database dumps, fixtures, and migration scripts often use SQL INSERT statements to represent data. If you need to feed that data into a JSON-speaking API or a JavaScript application, you need to convert the INSERTs back into JSON. Lintify parses one or more INSERT statements and produces a JSON array of objects — one object per row, with the column names from the INTO clause as keys.
The parser handles PostgreSQL, MySQL, and SQLite syntax (the three dialects differ mostly in identifier quoting, which the parser handles transparently). It also handles multi-row INSERTs — a single INSERT with multiple VALUES tuples produces multiple JSON objects, one per tuple, in the same order.
How SQL types are mapped to JSON
SQL NULL becomes JSON null.TRUE/FALSE become JSON booleans. Integer literals become JSON numbers. Decimal literals become JSON numbers (which are floats in JavaScript). String literals (single-quoted, with'' as the escape for a literal single quote) become JSON strings. Column order is preserved in the resulting JSON object.
What is not supported
Lintify does not execute SQL — it only parses literal values in INSERT statements. SQL functions and expressions like NOW(),UUID(), or 1 + 1 are treated as strings, not evaluated. If you need to evaluate SQL expressions, run the query against a real database and export the result as JSON. SELECT statements are not supported for the same reason — they require running against a database to produce results.
Multi-row INSERTs
A single INSERT with multiple VALUES tuples is the most efficient way to bulk-load data into a SQL database, and it is the format most database dump tools produce. Lintify handles this case natively: each tuple in the VALUES list becomes a separate JSON object in the output array. The column names from the INTO clause are used as keys for every object, so the result is a uniform array suitable for feeding directly into a JSON API.
Frequently asked questions
Common questions about the SQL → JSON tool.