SQL Minifier
Squeeze a query onto one line for code, logs or config files without breaking it.
- Your data never leaves your device
- 100% free
- No sign-up
- Works offline after first load
How to minify SQL
- Paste SQL or open a .sql file.
- Choose what to remove and the keyword case.
- Copy or download the minified SQL.
About SQL Minifier
Compress SQL into a compact query.
Everything works in your browser, so it is instant and private, and your settings are remembered on this device.
Good for
- Embedding queries in source code and JSON
- Shrinking SQL in logs and configs
- Sending queries through APIs
Tip: Keep “One statement per line” on for migration files so each statement stays easy to find.
Frequently asked questions
Will it break my strings?
No — text inside quotes, backticks, [brackets] and PostgreSQL $$ blocks is kept exactly as written, including spaces and anything that looks like a comment.
Are optimizer hints kept?
Yes — /*+ … */ hints and MySQL /*! … */ comments are kept unless you turn that off.
Why minify SQL?
To embed queries in code, JSON or config files on one line, to shrink logs, or to make queries harder to read casually.
Can I get it readable again?
Yes — paste it into the SQL Formatter.
Is my data uploaded?
No. Everything is processed by JavaScript in your browser — nothing you paste or open is sent to a server, so it is safe for API responses, tokens, configs and customer data. It also works offline once the page has loaded.