Glossary
Minification
Making code or data compact, with syntax-specific preservation limits.
Minifying usually strips characters that exist for human readers (indentation, line breaks and often comments) while preserving program behaviour. That requires syntax-aware processing: a conservative minifier may leave some whitespace or comments intact, and any transformation should be reviewed where an exact source representation matters.
It is safe only if the tool understands the syntax. Whitespace inside a string literal is data, not formatting, and removing it changes the value. A line comment marker inside a string is not a comment. Anything that treats the input as plain text rather than parsing it will eventually corrupt a literal.
The JSON Minifier here parses and re-serialises values. It can therefore discard duplicate keys, round JavaScript numbers and rewrite escapes or number spelling; it is not a whitespace-only edit. For SQL, smaller text does not improve the query plan by itself. Compact output is mainly useful for transport or embedding, and is not a promise that every input will become shorter.
Tools where this comes up
- FormattersJSON Minifier
Remove all unnecessary whitespace from JSON and measure the saving.
- FormattersCSS Minifier
Compress CSS with safe, conservative optimisations.
- FormattersHTML Minifier
Compress HTML without changing how it renders.
- FormattersSQL Minifier
Compress SQL to one line, safely stripping comments.