SQL formatter
Format SQL for a specific dialect with consistent indentation and casing.
Loading tool…
About the sql formatter
Reformats SQL with consistent indentation and keyword casing across eleven dialects, including PostgreSQL, MySQL, T-SQL, BigQuery and Snowflake. Dialect choice matters for correctly handling each engine's quoting and function syntax.
Frequently asked questions
Will formatting change what my query does?
No. Only whitespace and keyword casing change; identifiers, string literals and structure are untouched. The query is reformatted, never rewritten.
Why pick a dialect?
Each engine has its own quirks — square-bracket quoting in T-SQL, backticks in MySQL, dollar-quoted blocks in PostgreSQL. The wrong dialect can misread those as ordinary text.