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

-- Active customers with recent orders SELECT c.id, c.email, o.total, o.created_at FROM customers AS c INNER JOIN orders AS o ON o.customer_id = c.id WHERE c.active = TRUE AND o.status = 'completed' ORDER BY o.created_at DESC LIMIT 50;

Minified SQL

SELECT c.id, c.email, o.total, o.created_at FROM customers AS c INNER JOIN orders AS o ON o.customer_id = c.id WHERE c.active = TRUE AND o.status = 'completed' ORDER BY o.created_at DESC LIMIT 50;

Options

Remove Comments
Strip -- line and /* block */ comments during minify (outside string literals).

Comments outside literals are removed

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.

Other actions for this language