JSON Minifier
Smallest possible JSON, with the savings measured.
Minifying removes every space, tab and newline that a parser ignores. For payloads sent over the wire that is free bandwidth: a formatted document is often 20–40% larger than the same data minified.
Input JSON
Minified JSON
What does minifying JSON do?
It parses the document and serializes it again with no optional whitespace: no indentation, no newlines, no space after a colon or a comma. The data is untouched — only the bytes a parser would skip are removed.
Jsonviewpro reports the before and after size in bytes and the percentage saved so you can judge whether it is worth it.
When to minify
- API responses and request bodies, where every kilobyte is transfer time.
- JSON embedded in HTML, JavaScript bundles or data attributes.
- Files stored in bulk, such as logs or event archives.
- Anywhere a size limit applies — cookies, query strings, message queue payloads.
When not to minify
Do not minify files that people edit or review: configuration, fixtures, seed data or anything in version control. A minified file produces a single-line diff on every change, which destroys code review.
Also note that gzip or brotli compression, which most servers apply automatically, already removes most of the cost of whitespace. Minifying on top of compression usually saves a few percent, not forty.
Is minified JSON still valid?
Yes. Whitespace between tokens is insignificant in JSON, so a minified document parses identically. You can always run it back through the formatter to make it readable again — nothing is lost.
Frequently asked questions
Can I undo minification?
How much smaller will my JSON get?
Does minifying remove null values or empty objects?
Related JSON tools
- JSON FormatterPretty-print messy JSON with your choice of indentation.
- JSON BeautifierClean up JSON with configurable indentation and key sorting.
- JSON ValidatorCheck syntax with precise line, column and cause.
- JSON ViewerExplore JSON as a collapsible tree with search and copyable paths.
- JSON AnalyzerProfile structure and surface data-quality problems.