Paste your JSON below to strip all unnecessary whitespace and get a compact version instantly. Invalid JSON is flagged with an exact error message. All processing is client-side — your data never leaves your browser.
JSON minification removes all whitespace — spaces, tabs, and newlines — that sits between tokens in a JSON document. Because JSON's grammar assigns no semantic meaning to whitespace outside of string values, a minified JSON document is 100% functionally identical to its pretty-printed counterpart. Every parser, every language runtime, and every API will consume it exactly the same way.
The payoff is purely in payload size. Pretty-printed JSON from APIs and config generators can contain thousands of characters of indentation in a large document. Minification typically achieves 10–30% size reduction on its own; combined with Gzip or Brotli compression at the transport layer, the savings compound further. For REST APIs, webhooks, and data pipelines that transfer JSON millions of times per day, this adds up to real bandwidth and latency improvements.
JSON.parse
.min.json
// … and /* … */ from JSONC files
Standard JSON (as defined by RFC 8259) does not allow comments. However, a widely-used superset called JSONC (JSON with Comments) — popularised by VS Code configuration files like tsconfig.json, launch.json, and settings.json — adds support for single-line (// …) and multi-line (/* … */) comments. JSONC files are not valid JSON and will cause a parse error in any standard JSON.parse call.
This tool's "Strip comments" option pre-processes input by removing both comment styles before parsing, allowing you to safely minify JSONC files. The resulting output is always valid, spec-compliant JSON. If you work with TypeScript, Vite, or any tool that uses JSONC config files, enabling this option before minifying will prevent parse errors downstream.