JSON Minifier
Remove every optional space and line break from your JSON, and see exactly how many bytes that saved.
- Original
- 0 B
- Minified
- 0 B
- Saved
- 0 B
- Gzipped
- 0 B
Input
Syntax colouring is off for this document because recolouring something this large on every keystroke would slow typing down. Every tool still works normally.
Output
Syntax colouring is off for this document because recolouring something this large on every keystroke would slow typing down. Every tool still works normally.
The result appears here.
Runs entirely in your browser. Nothing you paste is uploaded, and you can confirm that in your browser Network tab.
About this tool
Minifying removes whitespace that JSON does not need: the spaces after colons and commas, the indentation, and the line breaks. Nothing else changes. The values, their order and their exact text are identical, so minifying and formatting are safe to do as often as you like. Because this works on the token stream rather than parsing your document into a JavaScript value, long integers keep every digit and keys that look like numbers keep the order you gave them.
How to use
- Paste your JSON into the input pane, or load the sample.
- Press Minify. The result appears on the right.
- Check the saving, then copy the result or download it as a file.