How to use the JSON Minifier
- 1
Paste formatted JSON into the editor, or drop a .json file onto it.
- 2
Press Compact in the menu bar (Ctrl+Shift+I) to remove all whitespace. Press Format (Ctrl+I) to expand it again.
- 3
Use Copy > Copy compact to put the single-line JSON on your clipboard, or Save to download it.
Features
- Removes every space, tab and newline outside of strings
- Shows input size, output size and the percentage saved
- Validates first, so you never ship a broken document
- Handles files up to 25 MB locally in your browser
- Copy or download the result in one click
- Works offline after the first load
When minified JSON matters
Every byte an API returns is a byte the client has to download and parse. Formatted JSON carries indentation and newlines that machines do not need. Minifying removes them, which cuts transfer size, speeds up parsing on slow devices and keeps you under size limits in places like HTTP headers, local storage and message queues.
Minify versus compress
Minification and compression solve different problems. Minification deletes characters that carry no information. Compression (gzip, Brotli) encodes repeated patterns more efficiently. A minified document compresses better than a formatted one, so the right answer is almost always to do both: minify at build time, compress at the server.
Going back
Minified JSON is hard to read. If you need to inspect a compact document, paste it into the JSON Formatter and it becomes readable instantly. The JSON Editor does both in one place.
Frequently asked questions
Does minifying change the data?
How much smaller will my JSON be?
Should I minify JSON in my repository?
Is gzip better than minifying?
Is my data uploaded?
Last updated .