Developer Tools
SQL Formatter
Beautify and indent SQL queries for many dialects.
Free foreverRuns in your browserNo sign-up
About the SQL Formatter
Well-formatted SQL is far easier to read, review and debug than a single long line of keywords and columns.
Paste a query, pick your database dialect, and this tool re-indents it with consistent capitalisation and line breaks.
It supports many dialects including MySQL, PostgreSQL, SQL Server, SQLite and BigQuery, and runs entirely in your browser.
Key features
- Beautify and indent SQL
- Supports many SQL dialects
- Consistent keyword formatting
- Runs in your browser
How to use
- 1Pick your SQL dialect.
- 2Paste your query and click Format SQL.
- 3Copy the tidy result.
Frequently asked questions
- Which SQL dialects are supported?
- Standard SQL plus MySQL, PostgreSQL, MariaDB, SQLite, SQL Server (T-SQL), Oracle PL/SQL, BigQuery, Snowflake and Spark SQL.
- Does it run my query?
- No. It only formats the text of your query. It never connects to a database or executes anything.