SQL Formatter
Make tangled SQL readable — supports common dialects.
About SQL Formatter
SQL Formatter turns a tangled query into a readable one. It puts the major clauses — SELECT, FROM, JOIN, WHERE, GROUP BY, ORDER BY — on their own lines, indents nested subqueries, breaks up long column lists, and applies consistent keyword casing, so a query pasted as one long line becomes something you can actually review.
Paste a query and choose your dialect. A statement like select id,name from users u join orders o on o.uid=u.id where o.total>100 is expanded into a clause-per-line layout with the join condition and the filter clearly separated. Formatting is purely cosmetic — the query logic, the table and column names, and any literal values are never changed.
Dialect choice matters because each database has its own keywords and quoting rules: standard SQL, MySQL, PostgreSQL, SQLite, BigQuery, Snowflake, T-SQL, and Redshift are supported, and picking the right one keeps dialect-specific syntax intact. The tool formats text only — it does not connect to a database, execute the query, or check that the referenced tables and columns exist.
Formatting runs entirely in your browser. Queries often embed table names, business logic, and sometimes literal values drawn from production data; none of that is uploaded or stored here.