SOQL formatter and beautifier
Paste a Salesforce SOQL query and get a readable, consistently indented version. Subqueries are indented under their parent, and nothing leaves your browser.
Apex brackets around a query, like [SELECT ...], are removed automatically.
What it does
The formatter splits a query into its clauses, puts each selected field on its own line, starts each AND or OR on a new line in WHERE and HAVING, and indents parent-to-child and semi-join subqueries. String literals and bind variables are left exactly as written.
Frequently asked questions
Does my query get sent anywhere?
No. Formatting runs entirely in your browser.
Does it change what the query does?
No. It only changes whitespace and the case of keywords. Field names, object names and string values keep their original case.
Can it format queries that contain subqueries?
Yes. Subqueries in the SELECT list and in WHERE clauses are indented under their parent.