Turn a spaghetti query into a readable, indented statement with upcased keywords and clause-aware line breaks — or collapse it down to a compact one-liner.
Yes. Single-quoted strings, double-quoted identifiers, and backtick literals are tokenized and never modified — only keywords outside strings are upcased.
SELECT, FROM, WHERE, JOIN, GROUP BY, HAVING, ORDER BY, LIMIT, VALUES, and similar top-level clauses each start on their own line, with TOP-level commas breaking selected columns onto separate lines.
100% client-side — your SQL never leaves the browser.