SQL Minifier
Minify SQL
Remove SQL comments, blank lines and unnecessary whitespace while protecting strings, quoted identifiers and dialect-specific syntax.
Safe mode keeps a little readability around comma-separated values. Maximum mode removes additional optional punctuation spacing without collapsing risky arithmetic operators. SQL strings, quoted identifiers and semantic optimizer comments are preserved.
About This Tool
The XAVERT SQL Minifier compresses SQL queries locally in your browser.
Main Features
- Remove ordinary line and block comments safely.
- Preserve optimizer hints and executable semantic comments.
- Protect quoted strings, identifiers and PostgreSQL dollar quotes.
- Handle MySQL comments, T-SQL temporary tables and Oracle q-quotes.
- Choose the matching SQL dialect and start with Safe Minify before using Maximum Compression.
- Track characters saved, compression and removed comments; minification does not optimize query execution.
- Review and test the result against a non-production database, then copy or download the minified SQL file.
Privacy First
SQL processing happens locally within your browser. Your queries are never uploaded, transmitted, shared or stored on any server.