Remove optional spaces, indentation, and line breaks from valid JSON to create a compact serialized representation. Minification reduces character count without changing the parsed data.
JSONFormatView parses before minifying, preventing malformed text from being silently compressed. The result can be copied or downloaded after you compare its byte count and structure.
What minification removes
JSON permits whitespace between structural tokens. A minifier removes that whitespace and serializes the value with no indentation. It does not remove characters within strings, rename properties, reorder arrays, or shorten values.
Because the source is parsed and serialized, insignificant differences such as exponent notation or a negative zero may be normalized by JavaScript’s JSON serializer. Do not use a generic minifier when byte-for-byte signatures must remain valid.
Minification is not transport compression
Minification reduces the uncompressed text size, especially for heavily indented files. HTTP gzip or Brotli compression usually produces a much larger transfer reduction by encoding repeated text patterns. Production APIs commonly use both compact serialization and HTTP compression.
When to keep readable JSON
Keep formatted versions in documentation, code review, fixtures, and files that people edit. Use minified output for constrained payloads or generated artifacts, and retain a readable source of truth when maintainability matters.
Frequently asked questions
Does minifying JSON remove data?
No. It removes optional formatting whitespace, not properties, array items, or string content.
Will minification make an API faster?
It can reduce raw payload size, but network compression and application behavior usually matter more. Measure the actual transfer.
Can invalid JSON be minified?
Not safely by this tool. Correct or repair the syntax before minifying.