SQL Formatter
Pretty-print SQL queries. Supports MySQL, PostgreSQL, SQLite, MS SQL, BigQuery, and more.
SQL Input
Output
About SQL Formatter
Pretty-print long single-line SQL into clean, indented, multi-line form. Great for code review, debugging, and documentation.
Supported Dialects
Standard SQL, MySQL, PostgreSQL, SQLite, MS SQL (T-SQL), BigQuery and more - keywords and functions of each dialect are recognized correctly.
Privacy
All processing happens in your browser. You can safely format production-DB queries and sensitive SQL.
FAQ
Does it format stored procedures and triggers?
Basic DDL/DML and some procedural SQL are supported. Very complex PL/SQL or T-SQL blocks may have edge cases.
Is the output executable?
Yes. Formatting only changes visual layout - the SQL semantics are preserved.