devpocket.dev

SQL Formatter

Format or minify SQL across PostgreSQL, MySQL, SQLite, BigQuery, and more.

Runs locally
Loading tool…

How to use

Paste a query and choose the matching SQL dialect. Select keyword case, indentation, and the number of blank lines between statements; output updates as you type. Minify keeps strings and comments intact while collapsing layout whitespace.

Dialect selection matters for operators, quoting, functions, and reserved words. When unsure, start with generic SQL and switch if vendor-specific syntax is formatted unexpectedly.

FAQ

Which SQL dialects are supported?

The formatter supports generic SQL, PostgreSQL, MySQL, MariaDB, SQLite, BigQuery, Snowflake, T-SQL, PL/SQL, Redshift, Spark, Trino, DuckDB, ClickHouse, Hive and others.

Does this validate that my query will run?

No. It tokenizes and formats SQL but does not connect to a database or validate tables, columns, permissions, or runtime semantics.

Related tools