Format minified SQL with syntax highlighting, or compress formatted SQL to a single line. Configurable indent, keyword case, and comma placement. 100% client-side.
SQL (Structured Query Language) is the standard language for relational databases. Complex queries —with nested subqueries, multiple JOINs, CTEs, and window functions —become unreadable when minified to a single line.
This formatter tokenizes SQL and applies structural indentation:
SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY, LIMIT each start a new lineJOIN, LEFT JOIN, ON each on their own lineWITH clauses get clean brace formattingSupports MySQL, PostgreSQL, SQL Server (T-SQL), and SQLite syntax. All formatting happens entirely in your browser —your SQL is never uploaded to a server.