What is JSON minification?
JSON minification removes insignificant spaces, tabs, and line breaks outside string values. It produces a smaller, compact JSON text without changing its keys, values, arrays, or objects.
The official JSON standard, RFC 8259, permits whitespace around structural characters. A minifier removes that formatting whitespace but must preserve whitespace inside quoted strings because it is part of the data.
How to minify JSON online
- Paste valid JSON into the input box, or choose Open JSON file.
- Select Minify JSON. JSONyfier validates the input before producing output.
- Review the measured UTF-8 byte counts, then copy or download the result.
JSONyfier uses the browser's JSON.parse() to validate syntax. It then removes whitespace from the original source rather than rebuilding the document with JSON.stringify(). This preserves key order and numeric spelling, including large integer tokens.
Minification versus compression
Minification and transfer compression solve related but different problems. Minification removes formatting and leaves plain JSON text. Gzip or Brotli encodes that text for network transfer and normally reduces it further. You can minify JSON before applying transfer compression, but browsers and servers must still negotiate the compression layer separately.
When to use compact JSON
- API responses, webhooks, and WebSocket messages where payload size matters.
- Configuration embedded in HTML or JavaScript bundles.
- Fixtures, caches, or database fields where human-readable indentation is unnecessary.
For debugging, documentation, and code review, use the JSON formatter instead. To diagnose invalid input, open the JSON validator.
Privacy and practical limits
The tool is static JavaScript: pasted content and opened files remain on your device. JSONyfier does not send tool input to its server. Processing capacity depends on the memory available to your browser, so very large files may be better handled with a command-line or streaming tool.
Technical content reviewed by Dynamic Foundries on .