SQL formatter

Paste a query and get readable SQL: clauses on their own lines, consistent indentation. One click turns it back into a compact single line.

Paste a query and get readable SQL: clauses on their own lines, consistent indentation. One click turns it back into a compact single line.

How to use

  1. Paste the SQL query
  2. Click Format for readability or Minify for one line
  3. Copy the result

Frequently asked questions

Which SQL dialects are supported?

Formatting is dialect-agnostic: it lays out standard keywords and structure, so MySQL, PostgreSQL and others all come out readable.

Does it execute my query?

No — the tool only rearranges text; nothing touches a database.

Is the query sent to a server?

No, formatting happens locally in your browser.