SQL Minifier
Remove whitespace and comments from SQL — compact queries for embedding in code and configs.
About SQL Minification
SQL minification removes unnecessary whitespace, newlines, and comments to produce compact SQL. This is useful when embedding SQL in application code, storing queries in JSON configuration files, or creating compact single-line SQL for logging and debugging. The minified output is semantically identical to the input and will execute correctly on any SQL database.
FAQ
Is minified SQL valid and executable?
Yes. SQL parsers ignore whitespace between tokens, so minified SQL is functionally identical to the formatted version.
What comment styles are removed?
Both single-line (-- comment) and multi-line block comments (/* comment */) are removed when the option is enabled.