About the SQL Query Formatter
Turn long single-line SQL into clean, readable queries with proper indentation and line breaks. Pick your dialect — MySQL, PostgreSQL, SQL Server (T-SQL), SQLite, MariaDB, BigQuery, Snowflake or standard SQL — and choose whether keywords are UPPERCASE or left as typed.
Frequently Asked Questions
How do I format a SQL query?
Paste the query, choose your SQL dialect and click Format.
Which SQL dialects are supported?
Standard SQL, MySQL, PostgreSQL, SQLite, MariaDB, SQL Server (T-SQL), BigQuery and Snowflake.
Can I make SQL keywords uppercase?
Yes, choose UPPERCASE for keyword case.
Does formatting change what the query does?
No, only whitespace and keyword case change.
Can it format multiple statements?
Yes, separate them with semicolons.
Why format SQL?
Readable SQL is easier to review, debug and maintain, especially long joins and subqueries.
How do I format SQL in SSMS or VS Code?
Use an extension or add-in; this page needs nothing installed.
Does it validate my SQL?
It formats but doesn’t execute or fully validate queries.
Does the SQL Query Formatter store my query?
No, it’s formatted and discarded immediately.
Is the SQL Query Formatter free to use?
Yes.