SQL Minifier

Compress SQL queries.

FreeNo registrationFast🔒 Runs in your browser
Input
Output
SELECT u.id,u.name,COUNT(o.id)AS orders FROM users u LEFT JOIN orders o ON o.user_id = u.id WHERE u.active = true AND u.created_at > '2026-01-01' GROUP BY u.id,u.name HAVING COUNT(o.id)> 3 ORDER BY orders DESC LIMIT 20
Input
229 bytes
Output
218 bytes
5% smaller
Minified successfully.
Privacy-first. Your data is processed locally in your browser and is never uploaded to our servers.
AI, on top of the deterministic tool
Explain, fix or convert this with AI
Upgrade to Pro

What is a SQL Minifier?

Minifying SQL collapses a formatted query onto a single line and strips comments, which is what you want when embedding a statement in code, a config value or a log line.

How to use the SQL Minifier

  1. Paste your data into the input panel, or load the sample.
  2. The result appears immediately — adjust the options if the tool offers any.
  3. Copy the output, or download it as a file.

SQL Minifier features

Minification
Comment stripping
Size statistics
One-click copy

Frequently asked questions

Is the SQL Minifier free?

Yes. The SQL Minifier is completely free, with no sign-up and no usage limits.

Is my data uploaded to a server?

No. Everything runs locally in your browser — your data never leaves your machine.

Does it work on mobile?

Yes. The SQL Minifier works in any modern browser on desktop, tablet and phone.

Can I use it offline?

Once the page has loaded, the SQL Minifier keeps working without a connection, because the processing happens in your browser.

Related developer tools

SQL Formatter

Format and beautify SQL queries.

SQL Validator

Validate SQL syntax.

JSON Minifier

Compress JSON by stripping whitespace.

Text Diff

Compare two blocks of text.