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
- .env InspectorInspect, mask, and convert env files
- JSONPath ExplorerPull a value out of JSON by path
- cURL → fetchConvert curl commands to fetch()
- Markdown PreviewerLive GitHub-flavored markdown
- JSON FormatterValidate and pretty-print
- Base64Encode and decode
- Diff CheckerCompare two text blocks
- Word CountCount, readability, stats
- TimestampUnix, ISO 8601, relative time
- Hash GeneratorSHA-1, SHA-256, SHA-512
- URL EncoderEncode, decode, parse URLs
- Text CaseUPPER, lower, Title, camelCase, more
- Character EntitiesHTML entities, Unicode, ASCII lookup
- JSON to TypeScriptGenerate TypeScript interfaces from JSON
- JWT DecoderInspect JSON Web Tokens
- Page WeightWeigh a page: bytes, grade, Core Web Vitals, HAR diff
- SQL Viewer & CopyOpen a .sql file, read it, copy it
- SQL SplitterSplit a migration into statements
- SQL Pre-flight CheckCatch RLS gaps & risky SQL
- Base ConverterBinary, octal, decimal, hex, bitwise
- Unicode InspectorCode points, bytes, invisible characters