SQL Formatter

Beautify SQL for MySQL, PostgreSQL, SQL Server and more.

Turn one-line SQL into clean, readable, indented queries.

🔒 Your queries stay in your browser.

How to use the sql formatter

  1. Paste a query.
  2. Choose the dialect and keyword case.
  3. Click Format SQL and copy.

Readable SQL

One clause per line and consistent keyword casing make queries easier to review and debug – especially joins and subqueries.

Frequently asked questions

Which databases are supported?

Standard SQL, MySQL, PostgreSQL, SQL Server, SQLite and BigQuery.

Does it run my query?

No, it only formats text.

Is it safe for production queries?

Yes – nothing is sent anywhere.

Guides

Related free tools

See all 147 free tools →