Skip to content

Developer tool

SQL Formatter

Paste a query to break SELECT, FROM, WHERE, JOIN, and ORDER BY onto separate lines.

Processed in your browser. The text is not sent to our servers.

How to format SQL

  1. Paste a SQL statement.
  2. Click Format SQL.
  3. Copy the statement with each main clause on its own line.

The formatter puts SELECT, FROM, WHERE, JOIN, and ORDER BY on their own lines and indents clauses inside parentheses. Text inside quotes is left unchanged.

Back to Developer tools

Frequently asked questions

Will this fix an invalid query?

No. It only breaks and indents the main clauses. Check the statement before you run it.

Is the SQL uploaded?

No. Formatting runs in your browser.