How to use it here: paste your JSON and press Minify. The status line shows that the JSON is valid and the minified size; then Copy result or Download .json. To make minified JSON readable again, press Format / Beautify or use the full JSON Formatter & Validator.
What JSON minification does
JSON ignores whitespace between values, so indentation and line breaks are only there for humans. Minifying removes them and leaves exactly the same data in fewer bytes. A file indented with two or four spaces typically shrinks by 10–30%, more if it is deeply nested.
{
"name": "Tolket",
"free": true
}
becomes {"name":"Tolket","free":true}.
How to minify JSON
- Paste JSON into the input box, or press Load sample to try it.
- Tick Sort keys A–Z if you want a stable key order, which makes files easier to compare in version control.
- Press Minify. If there is a syntax error, the message points to the line and column.
- Copy or download the result.
When to minify, and when not to
| Situation | Minify? |
|---|---|
| JSON embedded in HTML, a data attribute or a URL | Yes |
| Storing many records (local storage, a database column) | Yes |
| API responses served with gzip or Brotli | Optional: compression already removes most whitespace cost |
| Config files people edit (package.json, settings) | No, keep them readable |
Good to know
- Minifying goes through a full parse, so numbers are written in their shortest form (
1.0becomes1) and, if a key appears twice in the same object, only the last value is kept. - JSON does not allow comments or trailing commas; if your file has them, the validator will say where. Our guide to common JSON errors shows how to fix each one.
Frequently asked questions
Does minifying change my data?
No values change. Only whitespace is removed, apart from the number formatting and duplicate-key behaviour described above.
Is it safe to paste JSON with API keys or customer data?
Yes. Parsing and minifying run entirely in your browser; nothing is uploaded or logged.
How large a file can I minify?
Several megabytes work fine. Very large files are limited only by your browser’s memory.
Related tools
Beautify, validate and highlight JSON.
Password GeneratorRandom secrets and API test keys.
Word CounterCount characters in any text.
More quick tools
Character counterCase converterSERP previewWi-Fi password generator