SQL Formatter — Free, Supports 10+ Dialects
Free SQL formatter supporting PostgreSQL, MySQL, SQLite, SQL Server, BigQuery, Snowflake, Redshift, Oracle, DB2, MariaDB, and more. Configurable indent width and keyword case.
Supported dialects
Standard SQL, PostgreSQL, MySQL, MariaDB, SQLite, SQL Server (T-SQL), Oracle (PL/SQL), IBM DB2, Google BigQuery, Snowflake, Amazon Redshift, Spark SQL, Trino.
Reserved words, function names, and quoting differ across dialects — pick the one matching your database.
Customizable formatting
• Indent: 2 / 4 spaces, or tabs • Keyword case: UPPER / lower / preserve • Line width: 80 / 100 / 120 columns
Match your team's SQL style guide. Settings persist in browser storage.
Common use cases
• Format before posting to a GitHub PR • Style-unify SQL for documentation • Make one-line log SQL readable • Visualize structure of deeply-joined queries • Clean up legacy SQL before takeover