Last updated October 4, 2026 · Report an error
Pretty-printed JSON is easy for humans to read but wastes bytes in production, where every extra space and line break adds to payload size.
This tool strips all unnecessary whitespace and formatting from JSON, producing the smallest valid equivalent.
How it works
Paste your JSON. The tool parses it to confirm it's valid, then re-encodes it without any indentation, line breaks, or extra spaces between tokens — only the data itself remains.
- Enter jSON input.
- Click Calculate to see your results.
Examples
Minifying a small object
{\n "name": "value"\n} minifies to {"name":"value"}, saving several bytes.
Who should use it
- Reducing API response or request payload size.
- Compressing configuration files before storage or transmission.
Industry applications
- Web and API development
- DevOps and configuration management
Advantages
- Reduces payload size for network requests and storage.
- Validates the JSON as part of the process, catching syntax errors.
Limitations
- Minified JSON is much harder to read and debug by eye.
Common mistakes to avoid
- Pasting JSON with trailing commas or comments, which aren't valid in standard JSON and will fail validation.
- Assuming minification is required for correctness — it's purely a size optimization, and pretty-printed JSON is equally valid.
Best practices
- Minify JSON only for production payloads or storage where size matters — keep a pretty-printed version around during development for readability.
Tips
- For version-controlled config files, keep the pretty-printed version in the repository and minify only at build or deploy time — minified JSON produces unreadable diffs.