Format messy SQL queries with syntax highlighting, keyword casing, and indentation control. Supports SELECT, JOIN, subqueries, CTEs, and more — 100% browser-based.
Consistent indentation makes complex JOINs and subqueries far easier to understand and review.
Formatted SQL makes it trivial to spot WHERE clause errors, missing JOINs, or incorrect GROUP BY usage.
Standardized formatting reduces cognitive overhead during code reviews and pair programming sessions.
Collapse whitespace for use in config files, ORM queries, or anywhere you want compact single-line SQL.
Paste your raw, minified, or messy SQL query into the left panel.
Choose keyword casing, indentation style, and line length — results update live.
Copy the formatted SQL to clipboard or download it as a .sql file.
Yes — 100% free, no login, no limits.
This formatter supports standard SQL and is compatible with MySQL, PostgreSQL, SQLite, SQL Server (T-SQL), and Oracle SQL. It handles all standard DML (SELECT, INSERT, UPDATE, DELETE) and DDL (CREATE, ALTER, DROP) statements, as well as CTEs (WITH clauses), subqueries, and window functions.
No — all formatting is done entirely in your browser using JavaScript. Your SQL queries, which may contain sensitive schema information or data values, never leave your device.
Formatting adds consistent indentation, newlines, and keyword casing to make queries readable by humans. Minifying does the opposite — it strips all unnecessary whitespace to produce a compact single-line query, useful in application code, config files, or string literals.