Will minifying my SQL change how it executes?▾
No. Minification removes only whitespace tokens between keywords, identifiers, and operators. It never alters the order of clauses, changes operator precedence, or modifies any value. The query's execution plan and result set are identical before and after.
Are comments removed from the minified output?▾
Only if you enable comment stripping. By default, -- single-line comments and /* */ block comments are removed. If your comments include execution hints like /*+ INDEX(t idx) */ that the database engine reads, keep comment removal off.
Does it preserve whitespace inside quoted strings?▾
Yes. The minifier tracks quoted string boundaries and never modifies content between matching single-quote characters. WHERE message = 'hello world' stays exactly as written — only whitespace outside string literals is collapsed.
Why minify SQL — does it actually run faster?▾
Minification gives essentially zero runtime performance gain — modern query parsers handle whitespace in microseconds. The benefit is ergonomic: minified SQL fits cleanly inside string literals, JSON values, and URL parameters without multi-line quoting or escape sequences.
Can I get the original query back from minified output?▾
You can recover a readable formatted version using the SQL Formatter tool. The formatter will re-add indentation and line breaks. However, original comment text and exact spacing are lost if you stripped comments — keep the original in version control.
Will it break BigQuery or PostgreSQL specific syntax?▾
No. Minification is syntax-agnostic — it collapses whitespace without parsing dialect-specific constructs. STRUCT(), ARRAY(), and other BigQuery or PostgreSQL extensions are preserved because only whitespace tokens are removed.
Are -- single-line comments handled correctly?▾
Yes. Single-line comments from the -- character to the end of the line are detected and removed when comment stripping is enabled. Without stripping, they are preserved as inline text in the minified output.
Is the query sent to your server?▾
No. Minification runs entirely in your browser using JavaScript string processing. No network request is made and no data is sent to any server. Production queries with sensitive schema names or business logic are safe to paste.