Seven things it does cleanly.
Beautify mode
Multi-line, indented, keyword-cased — the version you'd write if you had time. Subqueries indent; JOINs line up.
Minimal mode
Single-line normalisation for embedding in code. Whitespace tidy, structure intact.
Side-by-side diff
Drop two queries; both auto-format; CodeMirror highlights the meaningful changes.
Rust core
Parsing and formatting via the ParquetViewer SQL engine. Small footprint, fast even on long queries.
Real-time
Reformats as you type. No "format" button, no spinner — feedback is immediate.
Character & line metrics
Both sides of the diff show character and line counts — useful when comparing query lengths.
State persistence
Last query and last diff stick between sessions.
Four moves to a readable query.
Paste the SQL
From a log, an ORM dump, or a code review. Format mode receives raw input.
Choose a mode
Beautify when you're reading; minimal when you're embedding. Toggle anytime.
Drop into diff
Compare two queries. Both auto-format. Real changes light up; cosmetics stay quiet.
Copy
One-click copy on either side. Paste straight into a migration, a PR, or a Slack thread.
The work it actually does.
ORM-generated SQL
Beautify the unreadable single-line query the ORM logged at debug level.
Migration diffs
Compare two versions of the same migration to spot what actually changed.
Inline queries
Minify before pasting into a string literal. The structure survives; the noise doesn't.
Showing structure
Pretty-print a complex query when explaining it to a colleague.
Drift detection
Diff two flavors of "the same" query that are subtly different — and find out where.
Plan-friendly form
Format ad-hoc SQL into the shape your query plan tool expects.
Things people ask before they download.
Which dialects are supported?
The formatter targets standard SQL with leniency around dialect-specific keywords. Postgres, MySQL, SQLite, and DuckDB-flavoured SQL all reformat cleanly.
What's the difference between beautify and minimal?
Beautify produces an indented, multi-line query. Minimal collapses to a single line for embedding while preserving structure.
How does diff mode handle whitespace differences?
Both sides auto-format first. That way only meaningful structural and content differences show up.
Does this run anything?
No. Formatting is parsing-only. There is no execution; nothing reaches a database.
Why a Rust core?
The same Rust engine powers Parquet Viewer; reusing it gives the SQL formatter a small footprint and a fast path for long queries.
Does this require network access?
No. SQL formatting is fully local.
