Removes insignificant whitespace from valid JSON. Key order, numbers, and strings stay the same. Nested structure is kept.
About this tool
An API response or a config file may carry readable spacing. This page takes that JSON and writes the same value with the insignificant whitespace removed, without reordering keys.
{ "a": 1, "b": [2, 3] } with spaces becomes {"a":1,"b":[2,3]}. The array and the numbers inside it stay. Strings remain quoted text.
The tool does not check a schema. If JSON.parse fails, nothing is written and the page stays open. The download file is named minified.json.
How to use it
1
Drop a JSON file or paste the text. Only valid JSON is minified. Invalid text is rejected and the page stays open.
2
Spaces and line breaks are removed. Keys are not sorted. Numbers and strings are left unchanged. { "a": 1, "b": [2, 3] } with spaces becomes {"a":1,"b":[2,3]}.
3
The downloaded file is named minified.json. A chosen file may be at most 2 MB. The text stays in the browser and is not uploaded.
What it accepts
Minifying strips insignificant whitespace from text that JSON.parse accepts. Objects, arrays, and nesting stay in place. Keys are not sorted. The spelling of a number and the contents of a string do not change. Example: { "a": 1, "b": [2, 3] } with spaces becomes {"a":1,"b":[2,3]}. This is not a validator beyond JSON.parse and it does not check a schema. Invalid JSON is rejected; the page stays open.
Where your data stays
The minified text is produced in this tab, and the download file is named minified.json. The JSON you paste or the file you choose is not sent to MegaToolkit. A file over 2 MB is not read. Copy the result or save it as minified.json. Closing the tab drops the text.
Questions
Are keys sorted?
No. Minifying only removes insignificant whitespace. Key order, numbers, and strings stay as they were.
What happens to invalid JSON?
It is rejected. The page stays open. Text that JSON.parse does not accept is not minified. This page does not check a schema.
What is the download named?
minified.json. The file is the minified JSON text.
Is there a size limit?
A chosen file may be at most 2 MB. A larger file is not read. The text is handled in the browser and is not uploaded.