SQL Formatter

Put SQL keywords and clauses on separate lines so queries read clearly.

Input
Output

                        

About SQL Formatter

SQL talks to databases. Long queries on one line are hard to follow. This tool uppercases keywords and indents joins and conditions.

Common Use Cases:

  • Reading a complex query someone else wrote
  • Preparing SQL for a code review
  • Learning how a query is structured

Developers: see the CI/CD & pipeline guide. More tutorials: guides hub · by Nalla.

Frequently Asked Questions

It is a common style choice. Keywords stand out from table and column names. SQL does not require it.

Yes for standard SQL. Database-specific syntax is left as you typed it.

No. Formatting runs in your browser.