Toolstia / JSON minifier
JSON minifier
Paste formatted JSON and get the smallest version, with every space and line break removed. The tool also checks that your JSON is valid and shows how many bytes you saved.
Your JSON is parsed and written again in your browser, so nothing is uploaded. Very large numbers, over 15 digits, can lose precision when parsed, as in any JavaScript tool.
How it works
- Paste your JSON.
- Optionally sort the keys alphabetically.
- Copy the minified result.
What minifying does
It removes the spaces, tabs and line breaks that make JSON easy to read but are not needed by a computer. The data stays exactly the same, so the file is smaller and faster to send.
Validation
If the JSON has a mistake, such as a missing comma or a trailing comma, the tool shows the error message instead of a result.
Sorting keys
Sorting puts the keys of every object in alphabetical order, which makes two versions of the same data easier to compare.
Big numbers
Numbers with more than 15 digits can lose precision, as in any JavaScript tool. Keep those values as strings if you need every digit.
Questions
Is the data changed?
No. Only whitespace is removed. Keys, values and their order stay the same unless you choose to sort keys.
Can it make the JSON readable again?
Yes, use the JSON formatter for that.
Is my JSON uploaded?
Everything happens in your browser, and nothing you enter is sent anywhere.