Minify JSON
Remove unnecessary whitespace, indentation and line breaks from a JSON to reduce its size before transmitting or storing it.
Processed on your device. Nothing is sent to any server.
Parses the JSON and re-serializes it with no spaces or line breaks, keeping exactly the same data in the most compact possible format.
Use cases
- Reducing a JSON's size before sending it over the network.
- Preparing a compact JSON to store in a database.
- Saving space in a configuration file.
How it works
- 1
Paste your JSON
Type or paste the formatted JSON into the input box.
- 2
Minify it
Click Minify and copy the compact result.
Technical details
- It removes spaces, tabs and line breaks outside strings; spaces inside text values are kept.
- It follows strict standard JSON: comments, trailing commas and single quotes aren't allowed.
- Integers longer than 15-16 digits (for example, 64-bit IDs) lose precision when processed: 12345678901234567890 becomes 12345678901234567000. If your JSON contains them, keep them as strings.
- If a key appears twice in the same object, only the last value is kept, without warning.
Frequently asked questions
Does it change the JSON's data?
Normally not: only the formatting changes. The exceptions are the ones above: very long integers that lose precision and duplicate keys, of which only the last survives.