Why minify JSON?
Minifying JSON removes all unnecessary whitespace — spaces, tabs, and newlines — without changing the data. This reduces file size and speeds up network transfers. APIs commonly return minified JSON to reduce bandwidth. Config files may be minified before deployment to reduce storage and parsing overhead.
Minification example
Before (186 bytes):
{
"name": "John",
"age": 25,
"active": true
}After (39 bytes):
{"name":"John","age":25,"active":true}