JSON Minifier, Compress JSON Online, Free and Private
Strip the spaces and line breaks from JSON to make it as small as possible, and see how many bytes you saved. Keys keep their order and big numbers stay exact. Nothing is uploaded.
Orders object keys alphabetically at every level.
Removes comments and trailing commas before parsing.
0 characters, 0 bytes
0 characters, 0 bytes
About the JSON Minifier
The JSON Minifier removes every space, tab and line break that JSON does not need, so the text takes as few bytes as possible. Paste your JSON on the left and the compact version appears on the right as you type, with a note that gives the size before and after and the percentage saved. This page opens in Minified mode; the same tool can also pretty-print and validate, using the layout buttons above the input.
Your JSON never leaves your device. Minifying runs in the page, so nothing is uploaded, logged or stored, and it is gone when you close the tab.
How to use it
Steps
- Paste or type JSON into JSON.
- Check that the note says Valid JSON. Only valid JSON is minified; an error shows the line and column of the first problem instead.
- Press Copy or Download .json.
What changes and what does not
Minifying changes whitespace and nothing else. Keys keep their order, duplicate keys are kept, strings are copied exactly as escaped, and numbers keep the digits you wrote, so 12345678901234567890 and 1.0 stay as they are. Turn on Sort keys only if you also want object keys in alphabetical order. Because the result is the same data, minifying twice gives the same text.
How much do you save
The saving depends on how much formatting the document had. The note reports bytes, not characters, so a document with accented letters or emoji is measured honestly: an é takes 2 bytes and an emoji 4. The percentage saved is
For example, { "a" : 1 } is 11 bytes and {"a":1} is 7 bytes, so the saving is . Pretty-printed documents with deep indentation often shrink by a third or more. Text that is already compact saves nothing, and the note says "same size".
Minifying is not compressing
Minified JSON is still plain text. Web servers usually also apply gzip or Brotli compression on top, which is much stronger, so minifying matters most when the size counts before compression, for example in a config file, a URL parameter or a database column. To make a document readable again, use the JSON Formatter, and to inspect a large one use the JSON Viewer.
Limits
The input must be valid JSON. Comments and trailing commas are rejected unless you turn on Repair, which removes them and says how many it removed. Nesting deeper than 1000 levels is reported as an error.
Frequently asked questions
Does minifying JSON change my data?
No. Only whitespace between tokens is removed. Key order, duplicate keys, string escapes and the exact digits of every number are kept, so the minified text means the same as the original.
Is my JSON uploaded?
No. Minifying runs in your browser and nothing is uploaded, logged or stored. Closing the tab clears the text, and the page makes no network request with your JSON.
How is the size saving measured?
In UTF-8 bytes, which is what is stored or sent over a network. An accented letter takes 2 bytes, a euro sign 3 and an emoji 4, so the figure can differ from the character count shown under the text boxes.
Is minifying the same as compressing?
No. Minified JSON is still readable text. Servers usually also apply gzip or Brotli, which saves far more. Minifying helps most where the raw size counts, such as config files, URL parameters and stored values.
Why does my already compact JSON show no saving?
There is no whitespace left to remove, so the output has the same size and the note says so. If it contains spaces inside strings, those are part of your data and are never touched.