Skip to content

SQL Formatter

Format SQL queries across dialects with configurable keyword case and indentation.

Formatted SQL

How to use the SQL Formatter

  1. Paste your SQL query.

  2. Pick your indentation.

  3. Click Beautify and copy the formatted SQL.

What is an SQL formatter?

An SQL formatter re-indents queries and standardises keyword casing so complex statements are easy to read and review. This tool supports standard SQL plus popular dialects, breaking SELECT lists, JOINs and WHERE clauses onto their own lines. Readable SQL is easier to debug, review in pull requests, and hand off to teammates.

Key features

  • Consistent indentation for SELECT, JOIN, WHERE & more
  • Configurable keyword case and indent width
  • Works with multiple SQL dialects
  • Private, in-browser formatting

Frequently asked questions

Which SQL dialects are supported?

Standard SQL plus common dialects like PostgreSQL, MySQL, SQLite, BigQuery and more via the SQL Formatter engine.

Does it change my query results?

No — formatting only changes whitespace and casing of keywords; the query itself is unchanged.

Can it format very long queries?

Yes. It handles large queries entirely in your browser.