Minify JSON
Remove all whitespace from JSON to produce the smallest possible payload, instantly in your browser.
How to use the Minify JSON
- Paste your JSON.
- Click Run to minify it to a single compact line.
- Copy the result. If the JSON is invalid, you'll see an error explaining what's wrong.
How the Minify JSON works
The minifier parses your JSON into data with the browser's native JSON parser and writes it back out with no indentation, spaces or line breaks. Because it really parses the input, the output is guaranteed to be valid JSON, and invalid input is reported instead of silently passed through.
Whitespace inside string values is preserved, since it's part of the data. Minifying typically shrinks formatted JSON by 10 to 30%, which helps for payloads and storage; for readable output, use Pretty Print JSON instead.
Frequently asked questions
- Is this tool free?
- Yes. Minify JSON at no cost, with no account required.
- What happens if my JSON is invalid?
- You'll see an error message describing what's wrong so you can fix it. Use the JSON Validator for a dedicated validity check.