DEV🗄️SQL Formatter
Keyword casing · clause breaks · subquery indent
Runs locally in your browser: strings, comments and identifiers are preserved verbatim; only keywords are re-cased. AND/OR stay on one line (BETWEEN-safe).
Excel and VBA tutorials from basics to practice — use the tools above as you go.
SQL Formatter: keyword casing and clause breaks
Typical scenarios: tidy up long SQL pulled from logs for review; unify team SQL style (upper-case keywords, one clause per line); expand nested subqueries before profiling a slow query.
How to use: paste SQL, pick keyword casing (upper/lower/preserve), hit Format. Major clauses (SELECT/FROM/WHERE/GROUP BY/ORDER BY/JOIN family) start on new lines; depth-0 commas become indented continuation lines; subqueries are indented as a block.
Notes: string literals, comments and identifiers are preserved verbatim — only a deliberately narrow keyword set gets re-cased, so a column named `date` is safe. AND/OR stay on one line (BETWEEN a AND b is safe). Complex dialects (stored procedures, window functions) are treated as plain expressions — review the output. Parsing is fully local.
Related Tools
← Home