Azlaan Electric AC Solar Center — Solar, CCTV, AC & electrical work, Faisalabad Call: 0300-8987448

SQL Query Formatter

Make messy SQL readable in one click. Paste your query, pick the keyword case and indent width, and get clean formatted SQL with every clause on its own line. Quoted text and comments are never changed.

Your SQL

Formatted SQL

No output yet. Format a query to see line and character counts.


                

How to use

  1. Paste your SQL query into the input box, or click "Sample query" to try one.
  2. Choose UPPERCASE or lowercase keywords, and an indent of 2 or 4 spaces.
  3. Click "Format SQL". Clauses move to their own lines and subqueries get indented.
  4. Use "Copy" to copy the result, or "Download .sql" to save it as a file.

Frequently asked questions

What does the SQL Query Formatter do?

It rewrites the SQL you paste with keywords in upper or lower case, each clause on its own line, and subqueries indented, while leaving text inside quotes and comments untouched.

Which keyword styles are available?

You can choose uppercase or lowercase keywords, and an indent width of 2 or 4 spaces.

Is it free?

Yes, it is free and needs no signup. Everything runs in your browser, so your SQL never leaves your device.