Skip to content
ToolInstant

SQL Minifier

Local

Minify SQL by removing comments and extra spaces. Strings, quoted names, $$ bodies and optimizer hints stay untouched, so the query means the same.

Loading tool…

Ready · Runs in this browser · nothing uploaded

Developer tools · Free · No upload · No sign-up

How to use the sql minifier for free

  1. 1Paste SQL or open a .sql file.
  2. 2Pick standard SQL or MySQL rules and whether to keep comments.
  3. 3Copy the minified SQL and see how much smaller it is.

Also useful for: sql minifier, minify sql, compress sql query, sql one line, remove comments from sql.

  • Completely free, no account needed
  • Your data never leaves your device
  • Works on desktop and mobile

Frequently asked questions

Is this SQL minifier free?+

Yes. Every tool on ToolInstant is free to use with no sign-up and no limits on how often you use it.

Is my data uploaded anywhere?+

No. Everything is processed inside your browser using JavaScript. Your input never leaves your device.

Does it work on mobile?+

Yes. ToolInstant works in any modern browser on phones, tablets and desktops.

Can minifying break my query?+

It reads SQL as tokens, so text in quotes, [brackets], backticks and $$ blocks is never changed, and it keeps a space wherever joining two tokens would change meaning (like - -1). Optimizer hints /*+ … */, MySQL /*! … */ code and GO or / separator lines are kept.