SQL Formatter

The SQL Formatter transforms complex, single-line SQL queries into clean, readable statements with proper keyword casing and indentation. Supporting multiple dialects including Standard SQL, MySQL, PostgreSQL, SQLite, MariaDB, and T-SQL, it is the perfect companion for database developers and data analysts who work with large, complex queries daily. Toggle between UPPER and lowercase keywords to match your team's conventions.

Query Input
SQL / DDL
Formated Result

Which SQL dialects are supported?

Standard SQL, MySQL, PostgreSQL, SQLite, MariaDB, and T-SQL (Microsoft SQL Server) are all supported with dialect-specific formatting rules and keyword recognition.

Can I toggle keyword casing style?

Yes, switch between UPPERCASE and lowercase keywords with one click to match your team's SQL coding conventions and style guides.

Does it handle complex queries with subqueries?

Yes, the formatter intelligently handles JOINs, subqueries, CTEs (WITH clauses), window functions, CASE expressions, and multi-statement scripts with proper indentation for each nesting level.