Skip to content
Work data is processed in your browser, not stored on our servers.
tools
SQL Query Formatter

SQL Query Formatter

Format query indentation and keyword case for Standard SQL and major database dialects.

All processing happens in your browser, and the SQL you enter is not sent to a server.

Key features

  • Supports 14 dialects including Standard SQL, PostgreSQL, MySQL, SQLite, and BigQuery.
  • Sets indentation to 2, 4, or 8 spaces.
  • Preserves SQL keyword case or normalizes it to uppercase or lowercase.
  • Reports formatting errors and provides successful output for copying.

How to use

  1. Choose the SQL dialect and style options.
  2. Paste the SQL query.
  3. Review and copy the formatted output.

Examples

  • Prepare a long query for review

    Format minified SQL with two, four, or eight spaces and consistent keyword case.

  • Format for a target dialect

    Choose PostgreSQL, BigQuery, or another target syntax and copy the readable result.

Privacy

SQL parsing and formatting run in your browser.

Common questions

Which SQL dialects are supported?
Choose from 14 dialects including standard SQL, PostgreSQL, MySQL, SQLite, and BigQuery.
Does it execute or validate the query?
No. It formats text under the selected dialect and never connects to a database or runs the query.