JSON Minifier
Strip the spaces and line breaks from JSON to make it as small as possible.
Minify your JSON
About this tool
Indented JSON is easy to read, but the spaces and line breaks add weight to every API response, config value and stored record. Paste JSON or open a file and press Minify to get it on one line with no extra whitespace, then see how many bytes you saved and copy or download the result.
The minifier checks the JSON first, so it never produces broken output: if there is a mistake, you get its line and column instead. Strings, numbers and key order stay exactly as they were, so the data means the same thing. Everything runs in your browser and nothing is uploaded.
How it works
- Paste or open JSONPaste text, or open a .json file up to 10 MB.
- MinifyPress Minify to remove every space and line break outside strings.
- Copy or downloadSee the size saved, then copy or save the result.
Questions people ask
Does minifying change my data?
How much smaller will it be?
Should I minify or use gzip?
Before you minify
Keep a readable copy
Minified JSON is hard to read and edit. Keep the formatted version for editing and minify only what you ship.
Sort keys for stable output
Sorting keys gives the same output for the same data, which helps caching and comparing versions.
Strings stay untouched
Spaces and line breaks inside strings are part of your data, so they are kept exactly as they are.
