๐๏ธ SQL to JSON Converter
Convert SQL dump files (CREATE TABLE + INSERT INTO) to structured JSON. Multi-dialect, big-int safe, zero-server processing.
Convert SQL dump files containing CREATE TABLE and INSERT INTO statements into structured JSON. The parser extracts table names, column definitions, and row data, outputting {"table_name": [{"col": value}, ...]}. Supports MySQL, PostgreSQL, SQLite, and MSSQL โ automatically detecting identifier quoting and string escape patterns. Multi-table dumps are handled; unsupported constructs are flagged with line numbers in a warnings panel.
Not supported: SELECT, JOIN, stored procedures, triggers, views, ALTER/UPDATE/DELETE โ flagged with warnings.
๐ When to Use
Ideal for migrating SQL dump data to JSON for API integration, NoSQL databases, or web app configuration. Extracts schema and row data into clean, structured JSON โ all in your browser.
โ๏ธ How It Works
Custom state-machine tokenizer parses CREATE TABLE and INSERT INTO character by character. Auto-detects SQL dialect and applies correct escape mode. Comments stripped, identifiers normalized, types inferred. Big integers above 2โตยณ-1 preserved as strings. No server communication.
How to Use
- Paste CREATE TABLE and INSERT INTO statements. Works with MySQL, PostgreSQL, SQLite, and MSSQL.
- Choose escape mode: Auto (recommended), Standard, or MySQL.
- Click Convert to JSON to extract structured data.
- Check warnings โ unsupported statements are flagged.
- Copy or Download the JSON output.
Frequently Asked Questions
What SQL statements are supported?
Only CREATE TABLE and INSERT INTO. SELECT, JOIN, stored procedures, triggers, and views are not supported. Designed for SQL dump files, not arbitrary queries.
Does my data get sent to a server?
No. All parsing happens in your browser. Your SQL never leaves your device.
How are data types converted?
NULL โ null, quoted strings โ string, numbers โ number, TRUE/FALSE โ boolean. Dates stay as strings. Big integers above 9,007,199,254,740,991 become strings.
What about multiple tables?
Each table is a key: {"users": [...], "orders": [...]}. Multiple INSERT blocks for the same table merge in order.
Which SQL dialects are supported?
MySQL (backtick, backslash), PostgreSQL (double-quote), SQLite (double-quote, brackets), MSSQL (brackets). Auto-detection with manual override.
What if part of my SQL can't be parsed?
Warnings with reasons appear. Nothing is silently skipped โ unsupported statements are flagged.
Which escape mode should I choose?
Auto (default) detects: backticks โ MySQL mode (backslash escapes), otherwise Standard mode ('' only). Override via dropdown if wrong.
Can I convert JSON back to SQL?
No, one-directional. For formatting SQL, use our SQL Formatter tool.
Cite this tool
@misc{toolstand_sqltojson,
title = {SQL to JSON Converter},
author = {{ToolStand}},
year = {2026},
url = {https://toolstand.io/tools/sql-to-json/}
}Using this tool in a post or paper? Copy a ready-made reference above.
Home โบ Developer & Data โบ SQL to JSON Converter