How to use
- Paste or type JSON into the input box.
- Select Minify, or press Ctrl+Enter (⌘+Enter on Mac) in the input box.
- If the JSON is invalid, fix the reported line and column and minify again.
- Use Copy output to copy the minified JSON.
What the minifier removes — and what it keeps
The minifier removes only insignificant whitespace: spaces, tabs and line breaks between JSON tokens. Whitespace inside strings is part of your data and is kept exactly.
Strings, escape sequences, numbers, key order and duplicate keys are copied exactly as written. Many minifiers parse JSON into JavaScript values and serialize it again, which silently changes data: integers larger than 2^53 lose precision (9007199254740993 becomes 9007199254740992), 1.0 becomes 1, and 1e+10 becomes 10000000000. This tool avoids that.
Validation first
Input is checked with your browser's built-in JSON parser, following the JSON standard (RFC 8259), before anything is removed. Invalid input is never repaired: comments, trailing commas, single quotes and unquoted keys are reported as errors, and no output is produced.
The minifier only removes whitespace. It does not check your data against a JSON Schema. To make minified JSON readable again, use the JSON Formatter.
Limits
Input is limited to 5,000,000 characters. Minified output is never longer than the input.
FAQ
- Is my JSON uploaded?
- No. Validation and minification run entirely in your browser. Your JSON is not sent to a server, not stored, and not added to the page URL.
- Will minifying change my numbers?
- No. Numbers are copied character for character, so 1.0, 1e+10 and very large integers keep their exact representation.
- Why are duplicate keys kept?
- The JSON standard allows them, and removing one would change your data. They stay in their original order.