Minifying JSON payloads strips all non-structural whitespace, tabs, and line feeds to produce the smallest possible text representation.
1. Single-Pass Token Scanning
Minification identifies quotes, escape sequences, and structural delimiters without allocating complex intermediate AST nodes:
function minifyJson(jsonString) {
return JSON.stringify(JSON.parse(jsonString));
}2. Byte Savings Analysis & HTTP Compression
| Payload Type | Unformatted (KB) | Formatted (KB) | Minified (KB) | Minified + Brotli (KB) |
|---|---|---|---|---|
| User Profile API | 12.4 | 18.2 | 11.8 | 2.6 |
| Catalog Dataset | 245.0 | 380.5 | 231.2 | 34.8 |
| Large Log Export | 4,200.0 | 6,500.0 | 3,950.0 | 480.0 |
Put this into practice with the JSON Minifier
Runs entirely in your browser — no upload, no signup, and your data never leaves your device.
Open JSON Minifier →