SQL Formatter
Break a SQL query onto readable lines with uppercase keywords.
Worth Knowing
Formatting SQL — uppercasing keywords and breaking clauses onto their own lines — turns a dense one-line query into something you can actually reason about, which matters most for the long joins and nested subqueries where bugs hide. The uppercase-keyword convention isn't required by any database (SQL keywords are case-insensitive) but is near-universal because it separates the language's structure from your table and column names at a glance, making the query's logic easier to follow and review.
How to Use
- Paste or type your sql into the SQL Formatter above.
- The output updates instantly and is ready to copy.