Minify JSON online
No sign-up. Files and text stay in your browser.
How to minify JSON
- Paste JSON or open a UTF-8 .json file up to 1 MiB.
- Select Minify JSON. Review any syntax errors or compare the original and minified file sizes.
- Copy the compact JSON or download it as a file.
What JSON minification preserves
Spaces and escape sequences inside strings stay intact. The tool also preserves object key order, duplicate keys and the written form of numbers, including integers larger than JavaScript's safe integer limit. The output remains readable by JSON parsers. To compress the downloaded bytes further, use the GZIP Compressor.
Continue with a related task
Questions
Does minifying JSON change the data?
The tool removes whitespace between JSON tokens. Strings, numeric tokens, key order and duplicate keys stay in the output exactly as written.
Can this minifier handle large JSON integers?
Yes. JavaScript validates the source, but the tool copies the original number tokens to the output without reserializing them.
Will it accept comments or trailing commas?
The tool accepts valid JSON. Remove comments and trailing commas before minifying files written as JSONC or JSON5.
What is the difference between minified JSON and GZIP?
Minified JSON is ordinary text with unnecessary whitespace removed. GZIP compresses it into a binary .gz file that needs to be decompressed before reading.