How to use it
- 1
Paste SQL and choose the keyword casing.
- 2
Choose two- or four-space indentation and run the formatter.
- 3
Review any dialect warnings and copy the result.
What the tool can do
- Common SELECT, INSERT, UPDATE, DELETE, WITH, UNION, JOIN, ordering, and grouping clauses.
- Strings with escaped quotes, line and block comments, and quoted identifiers.
- Nested subqueries with a depth limit and indentation.
- Uppercase, lowercase, or preserved keyword casing.
Common use cases
- Preparing a query for code review.
- Reading SQL copied from logs or migrations.
- Normalizing an example for documentation or an issue.
How it works inside
Input is limited to 500,000 characters, 20,000 tokens, and depth 64.
The formatter does not connect to a database or send SQL to the WebDiag backend.
Questions and answers
Does formatting SQL change database data?
No. The query is handled as text in the browser and is not executed. The tool adds indentation and line breaks for readability. No database connection is required.
Does an error-free result mean the query will run?
Formatting does not check tables, permissions, or every rule of your database engine. Choose the appropriate dialect and test the query in a safe project environment. Execution requires separate database access.
