About this tool
Minifying removes whitespace outside strings. The data is identical but the file is smaller, which saves bandwidth and storage. The status bar shows the byte size before and after.
What does minifying JSON do?
Minifying removes whitespace outside strings, such as spaces, tabs and line breaks. The data stays exactly the same but the text gets smaller.
Before:
{
"id": 1,
"name": "Asha"
}
After: {"id":1,"name":"Asha"}When does minifying help?
Minified JSON is useful for API payloads, values stored in localStorage or a database, and data embedded in scripts. If your server already compresses responses with gzip or Brotli, the extra saving is smaller, but minifying still reduces what has to be stored and parsed.
Keep a readable, formatted copy in your source code or version control, and minify only what you ship.
How to use it
- Paste formatted JSON.
- The single-line version appears on the right with the size saved.
- Copy it or download it.
Frequently asked questions
When should I minify JSON?
Before sending it over a network, embedding it in code or storing it, where every byte counts.
Is minified JSON still valid?
Yes. Whitespace outside strings has no meaning in JSON.
How much smaller will it be?
Heavily indented JSON commonly shrinks by 20 to 40 percent.