
JSON Minifier
Strip whitespace to make JSON as small as possible.
Runs in your browser. Nothing you type is uploaded.
How to minify JSON
Paste your JSON and press Minify. All optional whitespace (spaces, tabs and line breaks between tokens) is removed, leaving the smallest valid text. Tick Sort keys first if you want a stable key order.
Why minify JSON?
Smaller JSON means less to send over the network and store. It is handy for embedding JSON in a URL, a script or an environment variable, and for comparing payloads that differ only in formatting.
FAQ
Is minified JSON still valid?
Yes. Whitespace outside strings has no meaning in JSON, so removing it never changes the data.
Are spaces inside strings removed?
No. Text inside quotes is left exactly as it is.
How do I make it readable again?
Use the JSON beautifier or the JSON formatter.
More JSON tools
- JSON formatter: Format, minify and validate JSON in one place.
- JSON validator: Check JSON syntax and find the exact line and column of an error.
- JSON beautifier: Pretty print JSON with 2 spaces, 4 spaces or tabs.
- JSON to Go struct: Generate Go struct definitions with json tags from a JSON sample.
- JSON to TypeScript: Generate TypeScript interfaces or types from a JSON sample.
- JSON to Python: Generate Pydantic models, dataclasses or TypedDicts from a JSON sample.
- JSON to Rust: Generate Rust structs with serde derives from a JSON sample.