Beautifier
Readable SQL in seconds
Normalize indentation, keyword case, commas, and line breaks across 20+ dialects so queries are easier to review in PRs, migrations, and notebooks.
Beautifier · Auto-commenter · Optimizer
SQL Script is a free browser-based workspace for developers, analysts, and DBAs: beautify dense queries, add plain-English auto-comments, and run safe structural optimizations—without sending your SQL to a server.
SELECT customer_id, COUNT(*) AS orders, SUM(total) AS revenue FROM orders WHERE created_at >= CURRENT_DATE - INTERVAL '30 days' GROUP BY customer_id ORDER BY revenue DESC;
Beautifier
Normalize indentation, keyword case, commas, and line breaks across 20+ dialects so queries are easier to review in PRs, migrations, and notebooks.
Auto-commenter
Turn beautified SQL into an auto-commented script with clause-level notes that help teammates understand joins, filters, grouping, and ordering faster.
Optimizer
Apply browser-based query cleanup—inline pass-through subqueries, push filters, and remove redundant conditions—then beautify the improved SQL.
Beautifier · Auto-commenter · Optimizer
Paste SQL and choose a dialect. Beautify for readability, turn on auto-comments for plain-English explanations, or run Optimize for safe structural rewrites—all in your browser.
Three tools, one page
Choose the dialect that matches your database, then apply indentation, keyword casing, comma placement, and logical-operator line breaks your team expects.
Generate plain-English explanation comments across the query so pull requests, tickets, runbooks, and docs capture intent—not just syntax.
Run safe structural rewrites in the browser, see what changed, and get beautified output ready to paste into your repo or warehouse console.
PostgreSQL, MySQL, SQLite, BigQuery, Snowflake, SQL Server, Spark, and standard SQL—with dialect-aware parsing for comments and optimization.
Export review-ready scripts to clipboard or .sql files after beautifying, commenting, or
optimizing.
Beautifying, commenting, and optimization execute locally. Follow your org policy for sensitive production SQL regardless.
SQL formatting guide
Separating SELECT, FROM, WHERE, GROUP BY, HAVING, and ORDER BY helps readers find the query structure.
Indentation makes subqueries, CTEs, CASE statements, and join predicates easier to reason about.
Short aliases are useful, but descriptive names reduce confusion in queries that join several tables.
From the blog
WITH-clause layout, naming, and beautifying long pipelines for review.
Nested SELECT shapes that are good candidates for structural optimization.
Browser-based rewrites, change summaries, and how they fit with beautify and auto-comment.
Dialect details that matter when beautifying SQL for production work.
Consistent style so reviewers focus on logic, performance, and correctness.
Indentation, line breaks, naming, and clause organization for professional SQL.
Frequently asked questions
SQL Script is a free browser tool that combines a SQL beautifier, a plain-English auto-commenter, and a structural SQL optimizer for review-ready queries.
Beautifying changes presentation only. The optimizer applies conservative rewrites intended to preserve semantics; always review output before running against production data.
After beautifying, optional comments describe clauses such as SELECT lists, joins, filters, grouping, and ordering—generated locally from the parsed query structure.
Common passes include inlining pass-through subqueries, pushing filters into inner scopes, and removing always-true conditions—with a plain-language summary of each change.
Choose from 20+ dialects including PostgreSQL, MySQL, SQLite, BigQuery, Snowflake, and SQL Server so keywords and syntax stay aligned with your target engine.
Processing runs in your browser, but follow your organization's policy for confidential production queries and credentials.