SQL Formatter

Turn a one-line query from a log or an ORM into readable SQL — keywords uppercased, one clause per line.

What it does

Major clauses (SELECT, FROM, WHERE, JOIN, GROUP BY, ORDER BY…) each start a new line, conditions after AND/OR are indented, and keywords are uppercased. String literals are left untouched, so WHERE name = 'select' stays correct.

Frequently asked questions

Does it validate my SQL?

No — it's a formatter, not a parser. It makes queries readable without needing to understand your schema or dialect, which also means it happily formats queries with logic errors. Run them against your database to validate.

Which SQL dialects work?

The formatting rules are dialect-neutral, so PostgreSQL, MySQL, SQLite, SQL Server and BigQuery queries all format fine. Dialect-specific keywords not in the list simply keep their case.

Last updated: 2026-07-13