What does this tool do?
| Direct answer | SQL Minifier collapses all whitespace to single spaces or removes it around operators, keeping literals intact. |
| Key fact | Whitespace inside quoted strings is significant and always preserved. |
| Processing | Runs locally in your browser; no data is sent to a server. |
How to use
- Paste SQL into the input.
- Click Minify SQL.
- Copy the single-line query.
Example
Input
SELECT id, name FROM users WHERE active = 1
Output
SELECT id,name FROM users WHERE active=1
Who is this for?
This tool was built for people who need a fast answer in the browser — no install, no account, no data leaving the device.
Developers formatting API responses or config files, analysts inspecting minified payloads, and students learning structured data formats. If you have ever squinted at a one-line blob hoping to find a missing brace, this page is for you.
Frequently asked questions
Will minified SQL still run?
Yes — SQL ignores extra whitespace between tokens; only string literals keep theirs.
Are comments removed?
Line comments (-- …) are preserved as text; only whitespace is collapsed.
Why minify SQL?
Single-line queries are easier to embed in migrations, seeds, and API payloads.