SQL Formatter
Format SQL for PostgreSQL, MySQL, SQL Server, Oracle, BigQuery, Snowflake and more, with keyword case and indent options.
About this tool
Format SQL with indentation that follows its structure: clauses on their own lines, subqueries indented and lists broken up. Choose the dialect, from PostgreSQL and MySQL to SQL Server, Oracle, BigQuery, Snowflake and DuckDB, so its keywords and syntax are recognised.
Make keywords uppercase or lowercase, or leave them as written; nothing else about the query changes.
Nothing connects to a database and the SQL is never run, so formatting production queries is safe.