SQL Minifier
Strip comments and whitespace from SQL while preserving string literals and identifiers.
Minified (235 chars, −23.2%)
What it strips
- Line and block comments (
-- …,/* … */) - Redundant whitespace — collapses runs to a single space
- Spaces around punctuation that doesn't need them
What it keeps
String literals (single- and double-quoted), backtick identifiers, and $$…$$ dollar-quoted blocks are preserved verbatim so your queries still parse.
You might also like
- SVG OptimizerMinify and clean up SVG files in your browser using SVGO.
- Escape / UnescapeEscape or unescape strings for JSON, JavaScript, HTML attribute, XML, and SQL contexts.
- HTML & CSS Formatter / MinifierBeautify or minify HTML and CSS — pretty-print messy markup, or shrink it for production.
- JavaScript MinifierMinify JS / ES modules in your browser using Terser. Compression, mangling, and ECMA target are tunable.