JSON Minifier
Paste JSON to strip all whitespace and get the most compact valid JSON string, with original vs. minified byte sizes and compression percentage.
JSON Input
Minified Output
Paste JSON on the left and click Minify JSON.
Original
bytes
Minified
bytes
Saved
Valid JSON
Copied!
Summary
Paste JSON to strip all whitespace and get the most compact valid JSON string, with original vs. minified byte sizes and compression percentage.
How it works
- Paste your JSON into the input area. The tool parses it with the browser's built-in JSON.parse() to validate it, then re-serializes it with JSON.stringify() with no spacing argument, producing the most compact valid representation. Byte counts are calculated using TextEncoder so multi-byte Unicode characters are counted correctly.
Use cases
- Reduce JSON payload size before embedding in production code or config files.
- Compress API response bodies to lower bandwidth usage.
- Validate and compact JSON before storing in databases or environment variables.
- Quickly check how much whitespace is wasted in a formatted JSON file.
Frequently Asked Questions
Last updated: 2026-06-09 ·
Reviewed by Nham Vu