Support: SQL Formatter
Tell us what happened. Include which page you were on and what you expected to see. Most answers go out within a business day.
Common questions
How do I format SQL?
Paste it into the left box. It is laid out as you type, with each clause on its own line and the rest indented. Choose your database's dialect for the best result.
Which databases does it support?
Standard SQL, MySQL, MariaDB, PostgreSQL, SQLite, SQL Server (T-SQL), Oracle (PL/SQL), BigQuery, Snowflake, Redshift, Spark SQL, DB2 and DuckDB.
Can I minify SQL?
Yes. Choose Minified to remove comments, line breaks and extra spaces, leaving one line. Quoted strings and identifiers are kept exactly.
Will formatting change what my query does?
No. Only spacing, line breaks and keyword case change. Text in quotes and names are left as they are.
Why does it say it formatted as standard SQL?
The query used syntax the chosen dialect does not accept, such as square brackets with MySQL selected. Pick the right dialect and it formats in that dialect's style.
Is my SQL sent anywhere or run?
No. It is formatted in your browser and never sent to us or run against a database, which matters for queries with table names or data in them.
Is it free?
Yes, completely free, with no sign-up.