SQL Formatter
Format and indent SQL queries across 13 dialects with keyword casing.
Your input is processed locally in this browser tab.
How to use SQL Formatter
Select your SQL dialect and keyword case (UPPER, lower, or Preserve).
Adjust indent width, tab indentation, or dense operator spacing (a=b) as needed.
Paste or open SQL and copy or export the formatted .sql query.
Frequently asked questions
Are single-quoted strings and SQL comments preserved verbatim?
Yes. Comments (-- and /* */), quoted strings, and dialect identifiers stay intact during formatting.
Can I switch directly to Minify?
Yes. Use the Mode radio selector at the top of the workspace.