Choose the database dialect first
SQL dialects differ. Select the dialect that matches your query, then choose keyword case and indentation. Formatting rearranges whitespace; it does not run the query or connect to a database.
Worked example
select id,name from octopus_tools where active=true becomes a multiline query with SELECT, FROM and WHERE sections when uppercase keywords are selected.
Before you rely on the result
A neatly formatted query may still fail on your database. This is not a SQL validator or optimizer. Review vendor-specific syntax and placeholders before replacing the original.
Cite this page
ToolOctopus. “SQL formatter.” Updated . https://tooloctopus.com/sql-formatter.
Add an access date if your instructions require one.
Citation formatting uses citeproc-js by Frank Bennett and Citation Style Language styles. License and source code.