SQL Minifier
Remove ordinary comments and compact whitespace without changing quoted content.
When to use SQL Minifier
Compact a query for a log or configuration field while keeping a readable original for maintenance.
How to use SQL Minifier
- Prepare the input for SQL Minifier: SQL text with the matching dialect selected. Paste the text or use Load example.
- Select Minify.
- Check the output: SQL with ordinary comments removed and compacted whitespace. Copy only the result you intend to use.
A practical example
Input: SELECT id, name /* display fields */ FROM users; Output: SELECT id, name FROM users;
Limitations and common mistakes
Select the matching dialect. Line breaks may be retained to protect SQL string semantics. This is conservative compaction, not an optimizer. Unclosed quotes and block comments must be fixed first.
Questions about SQL Minifier
What should I enter in SQL Minifier?
SQL text with the matching dialect selected.
What does SQL Minifier return?
SQL with ordinary comments removed and compacted whitespace.
What should I check before using the result?
Select the matching dialect. Line breaks may be retained to protect SQL string semantics. This is conservative compaction, not an optimizer. Unclosed quotes and block comments must be fixed first.
Supported input and output
SQL text with the matching dialect selected.
SQL with ordinary comments removed and compacted whitespace.
