Minify SQL Online — Free SQL Compressor

Minify SQL queries instantly — select, reorder, concatenate and minify multiple .sql files as one bundle with your current options. 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

Concatenating SQL Files

On Minify SQL, select or drop multiple .sql files, reorder them, then concatenate and minify the complete bundle once with your current options. Processing stays in your browser. Optional file markers, comments and extra spacing are added before minification and may be removed from the final output when removeComments is enabled. Toolbar dialect settings apply to beautify pages only — minify concat uses whitespace and comment collapse on the whole bundle.

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.

How do I concatenate and minify multiple SQL files?

On Minify SQL, use the concat button or drop two or more .sql files on the input panel, reorder them, then concatenate and minify the complete bundle once with your current options. Everything runs in your browser. This workflow is not available on Beautify SQL or Unminify SQL, and file markers or extra spacing may be removed during minification when removeComments is enabled.

Verify it yourself

FastMinify processes your input in the browser. Inspect the network panel or read our validation gate to confirm nothing leaves your device.

Shrink code and assets for production — minify JavaScript, CSS, HTML, JSON and XML before gzip or CDN deploy.