Calculator
What the SQL Minifier does
SQL Minifier: formats Status and Minified SQL from SQL Input. Example: the sample loaded on the page gives status Minified.
Point it at SQL Input and it returns Status and Minified SQL. You can nudge a single number and watch the effect straight away.
Most people who open the SQL Minifier are people inspecting an API response. Most of these tasks are one-liners in a terminal, but not when you are away from one.
There is no back end here. The calculation runs where you are sitting, not on a server somewhere.
The sections that follow cover the fields, the method, and one full example computed from the defaults.
What do the SQL Minifier fields mean?
The SQL Minifier uses 1 input. Pre-filled inputs double as documentation: each one shows what a reasonable value looks like.
| Field | What to enter | Default |
|---|---|---|
| SQL Input | paste or type any amount of text | SELECT id, name, created_at FROM users WHERE active = 1 ORDER BY created_at DESC; |
How does the SQL Minifier work?
Each output is derived from the inputs above in a single pass; there is no hidden state carried between runs, so the same inputs always give the same formatted output.
Nothing is computed until the inputs pass their checks, so you will not get a confident answer built on a typo.
Worked example
These are the values the SQL Minifier loads by default, and the result it produces from them. This is the worked example the page starts from, reproduced here so you can check the arithmetic.
| SQL Input | SELECT id, name, created_at FROM users WHERE active = 1 O… |
|---|
| Status | Minified |
|---|---|
| Minified SQL | SELECT id, name, created_at FROM users WHERE active = 1 ORDER BY created_at DESC; |
How to use it
- Paste your content into SQL Input.
- Each keystroke triggers a fresh calculation, which is cheap because it happens locally.
- You get Status and Minified SQL back.
- Copy Link puts the current inputs in the URL, so bookmarking it brings the same numbers back.
What this tool does not do
- Output follows the common convention for this format; a specific toolchain may have its own house style.
- Processing happens in your browser, so extremely large inputs are bounded by available memory.
- It cannot detect a typo that happens to fall inside the valid range.
Frequently asked questions
Just SQL Input. Every box already holds a working value, which means a single edit is enough to get a meaningful answer.
With the values loaded when the page opens, status comes out as Minified. The figure is derived from the inputs above, so it updates whenever they do.
It never leaves the tab. The page does the work itself rather than asking a server to.
No. There is no account, no usage cap and no trial period. The site is funded by advertising rather than by charging for the tools.
The output is deterministic. The same inputs always give the same answer, and the method is documented above so you can check it.