About this tool
Strip indentation and line breaks to shrink JSON for API payloads, fixtures and config values. Only whitespace outside strings is removed, so spaces inside your values and long numbers stay as they were.
How to use it
- Paste JSON or import a file.
- The minified result appears on the right.
- Copy or download it.
Example
{
"name": "Datapry Tools",
"version": 1.10
}{"name":"Datapry Tools","version":1.10}Spaces inside strings and the trailing zero in 1.10 are preserved.
Questions
- Does minifying affect how JSON is parsed?
- No. Whitespace between tokens has no meaning in JSON, so any parser reads the minified text the same way.
- How much smaller will my file be?
- It depends on the indentation. Heavily nested, indented files often shrink noticeably, while compact files barely change. Compression such as gzip usually saves more over the network.
- Can I get the formatted version back?
- Yes. Run the output through the JSON Formatter. Nothing except whitespace is removed, so no data is lost.