database
SQL Formatter
Format and beautify SQL.
Paste a messy query and get it back with clean line breaks and indentation.
Frequently Asked Questions
The formatter works on standard SQL keywords (SELECT, FROM, WHERE, JOIN, GROUP BY, and similar) shared across MySQL, PostgreSQL, SQL Server, and SQLite.
No, it only adds line breaks and indentation for readability. The query itself, including any text inside quotes, is left exactly as you typed it.