SQL Formatter

Format and minify SQL queries across common dialects.

Loading tool...

Clean up SELECT queries, joins, CTEs, migrations and SQL snippets before sharing, debugging or documenting them.

  • SQL formatting
  • Dialect hints
  • Keyword casing
  • Query minifying

Make dense SQL readable

Format long queries into consistent indentation so joins, filters, groups and order clauses are easier to review.

Use dialect hints

Keep common SQL, MySQL, PostgreSQL, SQLite, BigQuery and Transact-SQL snippets organized without sending query text away from the browser.

Prepare compact snippets

Minified output is useful when SQL needs to fit into configs, fixtures, small documentation blocks or quick handoffs.

Private browser-based formatting

SQL input is formatted in your browser, so internal queries and database notes do not need to be uploaded to a server.

Frequently asked questions

It formats SQL into readable indentation, supports multiple dialects and can also create a compact minified version.

The tool includes options for Standard SQL, MySQL, PostgreSQL, SQLite, BigQuery and Transact-SQL snippets. It focuses on readable keyword casing, clause breaks and indentation.

No. It only formats pasted SQL text in your browser. It does not connect to a database or execute queries.

No. The tool runs in your browser, so pasted SQL is processed locally on your device.

Buy me a coffee