Skip to content

How SQL Formatter & Minify works

Paste SQL and beautify it with a PostgreSQL/Supabase-aware formatter (pick the dialect, keyword case, and indent), or switch to Minify to collapse it to one compact line. Minify is quote-aware, so a string or a $$ body is kept byte-exact. Beautify loads a formatter library from a CDN; minify runs locally.

Beautify uses the sql-formatter library loaded from a CDN (needs a connection). Minify is local: it strips comments and collapses whitespace outside string and dollar-quoted literals.

Questions

Which dialect should I pick?
PostgreSQL is the default and is what Supabase uses. Other dialects (MySQL, SQLite, BigQuery, Snowflake) are available from the dropdown.
Does Minify work offline?
Yes. Minify is computed locally. Beautify loads a formatter library from a CDN, so it needs a connection the first time.
Is my SQL sent anywhere?
No. Formatting and minifying both run in your browser. The CDN request only fetches the formatter library, never your SQL.
Will minify break my string literals?
No. The minifier is quote-aware: anything inside single quotes or a $$ dollar-quoted body is preserved exactly, including semicolons and spacing.

More Text & Data tools

All the tools · How to check that nothing is sent

SQL Formatter & Minifier, beautify SQL online | Only in the Tab