SQL Formatter
SQL Formatter formats messy SQL into readable, consistently indented queries, or minifies it for embedding. It supports PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, Oracle, BigQuery and Snowflake, and your queries are never sent anywhere.
How to use SQL Formatter
- Paste your SQL.
- Choose the dialect and the style options.
- Copy the formatted or minified SQL.
Frequently asked questions
Which SQL dialects are supported?
PostgreSQL, MySQL, MariaDB, SQLite, SQL Server, Oracle, BigQuery and Snowflake.
Does formatting change what the query does?
No. Formatting only changes whitespace and keyword case, not the logic.
Are my queries uploaded?
No. Formatting runs in your browser.
Next step
Comparing two versions of a query? Use the Text Diff Checker. Open Text Diff Checker.