Ready now
SQL Formatter
Preparing controls…
About this tool
What SQL Formatter does
Format common SQL statements with readable indentation and keyword casing without connecting to a database.
Reformat common SQL clauses with keyword casing and readable line breaks. Quoted text and comments are treated as syntax to preserve rather than queries to execute.
Lay out a simple filter
Input or settings
select id from users where active = 1
Expected result
SELECT id FROM users WHERE active = 1
How to use it
- Paste one supported SQL statement.
- Choose Format SQL and inspect clause breaks and quoted values.
- Review the full query in your database tooling before executing it there.
Common uses
- Make a short SELECT statement easier to review.
- Compare a query’s layout without connecting to a database.
Important limitations
- Formatting is not SQL validation, query planning or a security review.
- Dialect-specific syntax is preserved where possible but is not parsed against a complete dialect grammar or database schema.
Frequently asked questions
Will this tell me whether a query can run?
No. The formatter does not connect to a database or validate table, column, type or dialect rules.
Are keywords inside strings changed?
Quoted strings are tokenized separately so text such as a literal where is not treated as a SQL clause.