Skip to content
Convertto

SQL Formatter

Format and indent SQL queries for MySQL, PostgreSQL, SQLite, SQL Server and BigQuery.

To format SQL, paste your query above and it is re-indented with each clause on its own line. Choose your dialect so that database-specific syntax such as BigQuery backticks or SQL Server brackets is parsed correctly rather than mangled.

Runs in your browser
Privacy
Runs entirely in your browser — nothing is uploaded
Cost
Free, unlimited, no sign-up

Frequently asked questions

Does formatting change how a query runs?

No. The optimiser parses the query into the same plan regardless of whitespace. Formatting is entirely for the person reading it — which matters, because an unreadable query is where subtle join errors hide.

How to use the sql formatter

  1. 1Enter or paste your sql.
  2. 2Choose the dialect.
  3. 3Turn "Uppercase keywords" on or off as needed.
  4. 4The result appears immediately — copy or download it.

Embed this tool

Put the working sql formatter on your own site. It runs in your visitors' browsers exactly as it does here — free, no account, nothing uploaded.

Share this tool

Last updated

More data & format tools