Paste raw or messy SQL and get it back clean, indented and readable. Uppercase keywords, proper structure. Runs entirely in your browser.
A SQL formatter takes raw or compressed SQL queries and transforms them into clean, readable code with consistent indentation and uppercase keywords. This makes queries easier to read, review, debug and share with teammates.
Whenever you're reading queries from a log file, debugging a complex JOIN, reviewing someone else's code, or preparing SQL for documentation. Consistent formatting also helps with code reviews and version control diffs.
The standard convention is to write SQL keywords (SELECT, FROM, WHERE, JOIN, etc.) in uppercase and table/column names in lowercase. Each major clause starts on a new line with consistent indentation for nested conditions.
This formatter handles standard SQL including MySQL, PostgreSQL, SQLite and SQL Server syntax. Dialect-specific functions and types are preserved as-is โ the formatter only restructures layout, it doesn't change semantics.