SQL formatter
Format and beautify SQL queries for PostgreSQL, MySQL, SQLite, SQL Server, BigQuery and more, with keyword case and indent options.
Questions
Which databases does it understand?
Standard SQL plus the dialects of PostgreSQL, MySQL, MariaDB, SQLite, SQL Server (T-SQL), Oracle PL/SQL, BigQuery, Snowflake, Redshift, Spark, DuckDB, Trino, ClickHouse, Db2, Hive, TiDB, SingleStore and N1QL. Picking the right one helps with dialect-only syntax such as backtick names or @variables.
Does it check that my query is correct?
Only the shape of it. It reads the tokens and brackets well enough to lay the query out, and tells you where it got stuck, but it does not know your tables or run anything.
Is my SQL sent anywhere?
No. Formatting runs in your browser with the open source sql-formatter library.