Loading…
Compress JSON by stripping whitespace for smallest payload. Use when preparing production payloads; for readable output use json-formatter or json-beautifier. Input: JSON text ≤10MB. Returns minified JSON or line-numbered error. 100% client-side.
JSON Minifier is loading — interactive editor will appear here. Use examples below to try instantly once loaded.
Press ? for keyboard shortcuts
Minifies JSON by removing whitespace with options to strip boolean and number values, preserve specific keys from removal, and show a side-by-side size comparison. Includes a frequency chart showing value type distribution, and a pretty print toggle to switch between minified and formatted views instantly.
Reducing JSON payload size is critical for API performance and bandwidth savings, but standard minification (removing whitespace) only goes so far. This tool offers additional compression strategies like stripping optional fields and visualizes the savings with a size comparison and frequency chart.
This tool is part of the DevStackIO platform — a collection of free online developer tools from DevStackIO. Browse more free developer resources on DevStackIO.
API developers optimizing JSON response sizes, mobile developers reducing payload over cellular, and anyone shipping JSON where bandwidth is constrained.
Paste JSON into the input area or upload a .json file
Toggle whitespace removal on/off (off leaves formatting, on minifies)
Enable strip boolean or strip number to remove all boolean true/false or number values
Add key names to preserve keys to keep specific keys from being stripped
Review the size comparison showing original size, minified size, and percentage reduction
View the frequency chart showing counts of string, number, boolean, null, array, and object values
Input: '{"name":"John","age":30,"active":true}' with strip booleans. Output: '{"name":"John","age":30}' (5% size reduction).Input: A 100KB JSON file with whitespace removal only. Output: 65KB minified with size comparison showing 35% reduction.What size reductions can I expect?
Whitespace removal typically reduces 20-40%; stripping optional fields adds 5-20%.
Does the frequency chart count nested values?
Yes, it recursively traverses the entire document.
Can I restore stripped values?
No, stripping is irreversible; keep the original copy before minifying.
What is the difference between this and json-beautifier?
This focuses on compression with size stats; beautifier focuses on formatting with themes.
Authoritative specifications, standards, and in-depth reading for JSON Minifier.
Free online JSON formatter and validator with syntax highlighting and error line numbers. Use as default for beautify+validate+minify in one place; for two-file comparison use json-diff, for schema generation use json-schema-generator. Input: JSON ≤10MB. Returns formatted JSON or line-numbered error. 100% private.
Compare two JSON documents and highlight added, removed, and changed keys with line-level diff. Use when comparing API responses or configs; for single-document formatting use json-formatter, for validation errors use json-validator. Input: two JSON texts ≤10MB. Returns highlighted diff. 100% client-side.
Validate JSON syntax and report errors with line numbers without reformatting. Use when only correctness matters; for auto-fix and formatting use json-formatter. Input: JSON text ≤10MB. Returns valid/invalid + error location. 100% client-side.
Escape or unescape JSON strings. Use when embedding JSON; for formatting use json-formatter. Input: JSON ≤10MB. Returns escaped string. 100% client-side, files never leave browser.
Format and validate HTML with indentation and error reporting. Use as default HTML tool; for minifying production HTML use html-minifier, for converting HTML to Markdown use html-to-markdown. Input: HTML ≤10MB. Returns formatted HTML or validation errors. 100% client-side.
Format or minify CSS with indentation control. Use as default CSS tool handling both directions; css-minifier URL is a noindex alias. Input: CSS ≤10MB. Returns formatted or minified CSS. 100% client-side.
Minify JS for production or beautify minified JS for debugging. Use for JS only; for JSON use json-formatter, for CSS use css-formatter. Input: JS text ≤10MB. Returns minified or beautified JS or syntax error. 100% client-side.
Free online SQL formatter with indentation and keyword casing. Format queries privately in browser.