SQL Minifier
Collapse SQL queries onto one compact line without corrupting strings.
Your input is processed locally in this browser tab.
How to use SQL Minifier
Paste formatted multi-line SQL or open a .sql script (Minify mode is preselected).
Strips -- single-line comments and collapses whitespace safely outside string literals.
Copy or export the single-line compacted query.
Frequently asked questions
Does SQL Minifier alter casing inside string literals?
No. Keyword casing only applies to SQL keywords outside quotes and identifiers.
How are table.column dot chains handled?
Dots and commas keep clean SQL syntax without unnecessary spaces.