Format SQL queries into clean, readable code.
The SQL formatter rewrites a query with one clause per line (SELECT, FROM, WHERE, GROUP BY, ORDER BY…), joins and conditions indented, subqueries nested and keywords in the case you choose. It works with MySQL, PostgreSQL, SQL Server, SQLite and Oracle syntax.
Strings, quoted identifiers and comments are left untouched, and several statements separated by semicolons are formatted one after the other.
Clauses, joins and AND / OR conditions on their own lines.
Nested queries are indented.
UPPERCASE, lowercase or as written.
Strings and comments are never changed.
The formatter works on the common syntax of MySQL, MariaDB, PostgreSQL, SQL Server, SQLite and Oracle.
No, it only changes the layout. Run the query to find syntax errors.
It's a convention, not a rule; uppercase keywords make queries easier to scan.
No, it's formatted in your browser.