SQL Tools
Format, validate, and convert SQL queries with syntax awareness.
24 tools available, all running locally in your browser.
- JSON to SQLConvert a JSON representation back to a SELECT statement.TOOL
- SQL AnnotateAdd comments annotating each clause of a SELECT statement.TOOL
- SQL BeautifyPretty-print SQL with keyword uppercasing and clause indentation.TOOL
- SQL DELETE BuilderBuild a DELETE statement from JSON.TOOL
- SQL DiffCompare two SQL statements line by line.TOOL
- SQL ExplainGenerate a simplified EXPLAIN plan.TOOL
- SQL Extract ColumnsList the column names from a SELECT clause. Tokens are split on commas and dots, so qualified names come back broken apart — u.id yields two entries, u and id; table prefixes are not preserved.TOOL
- SQL Extract TablesList table names referenced after FROM and JOIN. Comma-style joins (FROM t1, t2) report only the first table — use explicit JOIN syntax for reliable extraction.TOOL
- SQL GROUP BY BuilderBuild a GROUP BY clause from JSON.TOOL
- SQL HAVING BuilderBuild a HAVING clause from JSON conditions.TOOL
- SQL INSERT BuilderBuild an INSERT INTO statement from JSON {table, columns, values}. All three fields are required — a missing field fails with a raw runtime error instead of a friendly validation message.TOOL
- SQL JOIN BuilderBuild a JOIN clause from JSON.TOOL
- SQL MergeMerge multiple SQL statements with UNION ALL.TOOL
- SQL MinifyCompress SQL to a single line, removing comments and extra whitespace.TOOL
- SQL NormalizeNormalize SQL: uppercase keywords, single spaces, trim.TOOL
- SQL OptimizerSuggest basic SQL optimizations.TOOL
- SQL ORDER BY BuilderBuild an ORDER BY clause from a JSON array of {col, dir} entries (dir is ASC or DESC). Both fields are required per entry — an entry missing dir fails with a raw runtime error instead of a friendly validation message.TOOL
- SQL SELECT BuilderBuild a SELECT statement from JSON.TOOL
- SQL to JSONConvert a simple SELECT into JSON {type, columns, table, where}. Parsing is simplistic: everything after WHERE lands in the where field — ORDER BY and LIMIT clauses end up inside it; stick to single flat SELECT statements.TOOL
- SQL Token ListLex SQL into a JSON token list (words, numbers, punctuation). Tokens carry type and value only — no source positions are tracked.TOOL
- SQL UNION BuilderBuild a UNION query from JSON.TOOL
- SQL UPDATE BuilderBuild an UPDATE statement from JSON.TOOL
- SQL ValidateA light SQL sanity check: the statement must start with a SQL keyword and brackets must balance. Statements that open with a parenthesis, like (SELECT 1) UNION (SELECT 2), are rejected — this is not a real SQL parser.TOOL
- SQL WHERE BuilderBuild a WHERE clause from JSON conditions [{col, op, val}]. Values are inserted verbatim — no quoting, escaping or parameterization — so the output is unvalidated SQL text; review it before ever running it against a database.TOOL