Developer

SQL Formatter

Paste a query to break it onto readable lines, with each major clause and column clearly separated.

Developer

SQL formatter

Local only
Everything stays in your browser

Your text is processed on your device — nothing is uploaded to a server.

Why format SQL?

Long single-line queries hide mistakes. Putting SELECT, FROM, JOIN, WHERE and ORDER BY on their own lines makes the shape of the query visible at a glance.

Dialect support

The formatter is dialect-agnostic: it recognises standard clauses common to MySQL, PostgreSQL, SQLite and SQL Server without executing anything.

Good to know

Frequently asked questions

Is my query sent to a database?

No. Nothing is executed and nothing leaves your browser — it is purely text formatting.

Does it validate the SQL?

No. It formats text; syntax errors are your database's job to report.

Can it handle subqueries?

Yes, though deeply nested subqueries may benefit from manual tidying afterwards.

Can I keep keywords lowercase?

Yes — use the lowercase formatting button.