Choose Standard SQL, MySQL, MariaDB, PostgreSQL, SQLite, T-SQL (SQL Server) or BigQuery to match your input. Set keywords to uppercase, lowercase or preserve their original case, and use 2 spaces, 4 spaces or tabs for indentation. Changing the dialect selects parsing rules; it does not translate the query into another dialect.
A consistent layout helps compare joins, WHERE conditions and nested subqueries during code review. Formatting does not execute SQL or verify tables, columns, permissions or query semantics. Stored procedures and DELIMITER commands are not supported.
Common questions and answers about this topic.
It formats SQL with your selected dialect, keyword case and indentation. It does not execute queries or validate SQL semantics. A formatting error may indicate a dialect mismatch or unsupported syntax, rather than an invalid database query.
Select Standard SQL, MySQL, MariaDB, PostgreSQL, SQLite, T-SQL (SQL Server) or BigQuery. Choose the dialect that matches your SQL; the formatter does not convert between dialects. Stored procedures and DELIMITER commands are not supported.
Yes, select 2 or 4 spaces, or tabs to match your SQL project's formatting conventions.
SQL formatting runs in a local browser worker. Your query is not uploaded or executed. Input is limited to 1 MB; split larger scripts into smaller query snippets.