Minify SQL Online — Free SQL Compressor
Minify SQL queries instantly — compress scripts before deploy. FastMinify preserves string literals while everything stays in your browser.
Loading…
SQL Minification
Minify SQL online.
Features
Compress queries — best-effort whitespace strip, not a full parser.
Minify SQL
Compress queries — best-effort whitespace strip, not a full parser.
Basic example
Input SQL
SELECT u.id, u.name, u.email
FROM users u
INNER JOIN orders o ON o.user_id = u.id
WHERE u.active = true
AND o.status = 'completed'
-- production query
Minified SQL
SELECT u.id, u.name, u.email FROM users u INNER JOIN orders o ON o.user_id = u.id WHERE u.active = true AND o.status = 'completed'
Options
Remove Comments
Strip -- line and /* block */ comments during minify (outside string literals).
Comments outside literals are removed
Dialect support
Beautify supports standard SQL, PostgreSQL, MySQL and SQLite dialects. Minify uses whitespace stripping — edge cases in T-SQL or BigQuery are out of scope.
FAQ — Minify SQL
Minification
Why minify SQL?
Smaller query scripts for logs, embeds and deploy bundles.
Need to beautify?
Use our SQL beautifier.
Need to unminify?
Try the SQL unminifier.
Looking for converters, encoders, formatters, and minifiers in one place? Developer tools hub Open the curated developer tools catalogue.