SQL Minifier
SQL ToolsCollapse SQL to one line and strip comments and extra whitespace.
Runs entirely in your browser โ nothing is uploaded
Features
- Collapses any query to a single line.
- Removes -- and /* */ comments safely.
- Preserves whitespace inside string literals.
- Reports the byte saving.
How to use the SQL Minifier
- 1Paste the formatted SQL.
- 2Choose whether to strip comments.
- 3Copy the single-line result.
Frequently asked questions
Is minified SQL faster?
Not measurably โ the planner ignores whitespace. It is useful for embedding queries in config files, logs or JSON.