How to format SQL
Paste a query and it is formatted as you type: every clause (SELECT, FROM, WHERE, JOIN, GROUP BY …) starts on its own line, the columns of a SELECT go one per line, and each AND / OR condition is indented underneath. Subqueries are indented a level deeper so you can see where they begin and end. Press Minify to squeeze a query back onto one line for logs or code strings.
Which SQL dialects are supported?
Pick your database so its quoting is understood: `backticks` and # comments in MySQL, [brackets] in SQL Server, $$dollar-quoted$$ strings and :: casts in PostgreSQL. Strings and comments are never changed — only the whitespace between the words and the case of SQL keywords.
Is it safe to paste production queries?
Yes. The formatter runs entirely in your browser, so table names, customer data in WHERE clauses and connection details never leave your device. It does not connect to any database and never runs your SQL.