Readable SQL without execution
Normalize layout and keyword casing before reviews, debugging or documentation without connecting to a database.
Format SQL into a readable layout and inspect its lexical structure without sending queries anywhere.
The formatter tokenizes first, keeps strings, quoted identifiers and comments opaque, then changes layout only outside those tokens.
Paste one or more statements. Press Ctrl/Cmd+Enter to format.
Only recognized keywords and whitespace outside protected tokens are rewritten.
The formatter does not analyze schemas or validate a database dialect. Vendor-specific extensions may remain in the query, but Devary does not claim they are valid or equivalent.
Normalize layout and keyword casing before reviews, debugging or documentation without connecting to a database.
This formatter preserves quoted content and comments, but it does not execute queries or prove that vendor-specific SQL is semantically valid.
Developer guide
SQL Formatter reflows SQL tokens locally, using selected keyword casing and indentation without executing a query or checking its database semantics.
Paste SQL and choose uppercase, lowercase or preserved keyword casing and 2- or 4-space indentation.
Run the formatter, then inspect statements, parameters and comments alongside the formatted output.
Check the query against your actual SQL dialect and database. Formatting does not validate schema names or query results.
The formatter moves major clauses to separate readable lines while maintaining the original tokens.
keywordCase=upper; indentSize=2select id from users where active = true;SELECT id
FROM users
WHERE active = TRUE;The string literal 'from' stays a string even when SQL keywords are transformed.
keywordCase=lower; indentSize=4select 'from' as label;select 'from' as label;This is lexical formatting; it does not connect to a database, execute statements or validate table schemas.
Dialect-specific constructs may format differently. Unterminated strings, comments or identifiers cause safe failures instead of a silent rewrite.
No. The formatter checks lexical structure, not semantic validity, execution plans or compatibility with a specific server.