SQL formatter
SQL formatter & minifier — free
Beautify SQL for PostgreSQL, MySQL, SQL Server, BigQuery, Snowflake and 15 more dialects — auto-detected from your query and always overridable. Full control over keyword case, indentation and layout; placeholders like ?, $1, :name and @name survive formatting. Includes a comment-safe whitespace minifier. Everything runs on your device.
Your SQL
Formatted
Formatted SQL appears here as you type.
Formatting optionsapplied live as you type — grouped by what they touch
Case
Layout
Queries
Formatter, not validatorwhat this tool does — and doesn’t
This tool reshapes whitespace, indentation and casing but does not check that your SQL actually runs — a query can format cleanly and still fail against your database. Placeholders (?, $n, :name, @name) are recognised and pass through intact, and minify is whitespace-only: strings, quoted identifiers and dollar-quoted bodies are never touched.
Formatted on your device — nothing is uploaded.