SQL Minifier
Developer Tools
100% in-browser
Strip comments and collapse whitespace to compress SQL into a single line.
How to use the SQL Minifier
- 1 Paste your SQL query.
- 2 Comments and extra whitespace are removed instantly.
- 3 Copy the minified SQL.
About the SQL Minifier
Minifying SQL is handy for logging queries on one line or embedding them in code. This tool removes line and block comments and collapses whitespace while keeping the query valid.
Everything runs in your browser.
Frequently asked questions
Does it remove comments?
Yes, both -- line comments and /* block comments */ are removed.
Will it change my query’s meaning?
No — only whitespace and comments are removed.