SQL Formatter

Format messy SQL into clean, readable code: keywords uppercased, clauses on their own lines and indentation applied. Free, fast and private.

Your result will appear here.

How to use SQL Formatter

  1. Paste your SQL query into the box.
  2. Click Format SQL.
  3. Copy the formatted query back into your editor.

Note: this tool runs in your browser. Nothing is uploaded.

Frequently Asked Questions

Is this tool free?

Yes, it is 100% free with no sign-up. Your data stays in your browser.

Do I need to install anything?

No. It works in any modern browser on phone, tablet or computer.

Is my data uploaded?

No. This tool runs entirely in your browser and your input is never uploaded to a server.

Does this formatter change my query logic?

No. It only changes whitespace and keyword case. It never adds, removes or reorders SQL logic, so the query returns the same results.