SQL Minifier

Runs entirely in your browser

Compress SQL by removing comments and unnecessary whitespace. This only rewrites text — it never executes your SQL.

Advertisement

0 Input characters
0 Output characters
Size reduction
Advertisement

What is SQL Minifier?

SQL Minifier removes comments, line breaks and unnecessary whitespace from a SQL query, collapsing it onto a single compact line. It's purely a text transformation and never connects to a database.

How to use SQL Minifier

  1. Paste your SQL query into the Input box.
  2. Click Minify.
  3. Copy the compressed result from the Output box.

Features

  • Strips -- line comments and /* block comments */.
  • Collapses all whitespace to single spaces.
  • Preserves string literals and identifiers exactly.
  • Shows input vs. output size and the percentage saved.
  • 100% client-side — your SQL never leaves your browser.

Frequently Asked Questions

Does this execute my SQL?

No. This tool only rewrites the text of your query. It never connects to a database or executes anything.

Are comments removed?

Yes. Both -- line comments and /* block comments */ are stripped, since they aren't needed once the query is minified.

Is my SQL uploaded to a server?

No. Minifying happens entirely in your browser.

Will minifying change what my query does?

No. Only whitespace and comments are removed — every identifier, literal and operator is preserved exactly.

Related tools