SQL Minifier
Collapse formatted SQL into a single compact line — literals and comments untouched.
About this tool
Logs, ORMs and query stores often prefer one-line SQL. This tool collapses all whitespace — newlines, indentation, doubled spaces — into single spaces, while string literals and comments are protected from any modification.
How to use it
- Paste your SQL, or click Sample.
- Click Minify SQL and copy the one-line result.
Good to know
- Comments survive minification — delete them first if you want the absolute smallest output.
- Get the whitespace back any time with the SQL Formatter.