SQL Formatter

Format, minify, and explore SQL queries locally. Strings and comments stay untouched; the Explainer helps you jump between clauses.

What you can do

  • Paste messy SQL and get readable layout
  • Minify for compact single-line style (outside strings/comments)
  • Pick a dialect for keyword casing
  • Use Explainer to highlight SELECT, FROM, JOIN, WHERE, etc.

Layout

Desktop: Input editor, formatted output (read-only), Explainer sidebar.

Compact: Input, Output, and Explainer tabs.

Formatting

ControlEffect
DialectKeyword list for UPPER/lower casing
Indent 2 / 4Nesting inside parentheses
KeywordsPreserve, UPPER, or lower
WrapOptional line breaks on long comma lists (80 / 100 / 120)
Auto formatUpdates output shortly after you stop typing
Format / MinifyRun once manually

Explainer

Click a clause in the list to highlight that section in the input editor. Useful for long queries with many joins.

File actions

Upload loads a file into input. Download saves output (or input if output is empty). Copy copies formatted output.

Tips

From logs or ORMs: Paste → set dialect → UPPER keywords → copy from output.

Review before commit: Format migrations and stored procedures, then diff in Diff Checker.

Comments and literals: -- comments and quoted strings are not reformatted inside.

Keep in mind

Formatting is heuristic, not a full SQL parser — always review output before running against production. Invalid SQL may still be “prettified” without syntax validation.

App shortcuts

ActionShortcut
Search tools⌘ K
Close current tab⌘⌥E (Ctrl+Alt+E on Windows)

Note: ⌘W closes the browser tab. ⌘⇧E focuses the Explorer in Cursor/VS Code. Use ⌘⌥E (Ctrl+Alt+E) to close the current tool tab (click inside the app first so the IDE does not steal the shortcut).