Compress JSON to the smallest valid string - free, no signup required.
Input JSON
Minified Output
Original: 0 BMinified: 0 BSaved: 0.0%
JSON Full Form
JSON stands for JavaScript Object Notation - a lightweight, text-based, language-independent data interchange format used across virtually every HTTP API in production today.
What this tool does
Validate, then strip - checks the input with JSON.parse, then removes the spaces, tabs and line breaks between values from your original text, so every number, string and key stays exactly as you wrote it.
Validate on the fly - invalid JSON shows the parser error immediately with the offending position.
Byte savings - See original vs minified byte counts and percentage saved.
Beautify - Reverses the minify and pretty-prints with 2-space indentation, again keeping every value as written.
Why minify JSON at all?
Indentation and line breaks make JSON pleasant to read, but every one of those spaces is a byte that has to be stored, sent and parsed. Minified JSON matters when the text has to fit somewhere tight: an environment variable, a single cell in a spreadsheet, a query string, a message queue with a size cap, or a fixture you want to keep on one line in a test file. It also makes logs easier to search, because each record stays on a single line.
How to use it
Paste JSON into the Input JSON box, click Upload File to open a .json or .txt file, or click Load Sample.
The output updates a moment after you stop typing. You can also click Minify at any time.
Check the stats line, which shows the original size, the minified size and the percentage saved.
Click Copy to put the result on your clipboard or Download to save it as minified.json.
To go the other way, click Beautify. It rewrites the input with 2-space indentation and minifies it again on the right.
The minifier returns {"id":42,"tags":["new","sale"],"price":19.50}, which is 45 bytes, a saving of 18%. Notice that 19.50 is still 19.50. The tool only removes whitespace between values; it never rewrites a number, so trailing zeros stay and 1e3 stays 1e3.
What it changes and what it keeps
Whitespace inside string values is never touched, so "New Delhi" keeps both spaces. Keys keep their order and nesting stays exactly the same. Because the output is your own text with the gaps taken out, values that a parse-and-rewrite tool would change are kept as written:
Integers beyond 9,007,199,254,740,991, such as a 20-digit ID, keep every digit. Many programs that later read the JSON will still round them, so storing long IDs as strings remains the safer habit.
If an object contains the same key twice, both entries are kept, in their original order. Most parsers use only the last one, so it is worth fixing at the source.
Escapes such as \u00e9 or \n stay escapes; they are not turned into the characters they stand for.
When minify fails
The minifier refuses invalid JSON instead of guessing. A red message appears with the parser error, usually naming the position of the first bad character. Fix that spot and the output appears straight away. If your data uses JavaScript-only syntax such as comments or unquoted keys, clean it up first in the JSON Formatter, which points to the exact line and column.
Privacy
Everything runs locally in your browser. Your JSON is never sent to our servers. You can paste API responses with tokens, personal data, or internal IDs without them leaving your machine.
Frequently Asked Questions
How does this differ from the JSON Formatter?
The JSON Formatter is a full editor with tree view, JMESPath transforms, and format conversion. The JSON Minifier is a single-purpose tool - paste, minify, copy. Use it when you just need a compact string quickly.
Does minifying change the data at all?
No. The tool checks the JSON with the browser's parser, then removes only the spaces, tabs and line breaks between values from your original text, so long numbers keep every digit, 19.50 stays 19.50, escapes stay as written and repeated keys are all kept.
Why does minify fail on my JSON?
Common reasons: single quotes instead of double, trailing commas, unquoted keys, JavaScript comments, or undefined/NaN/Infinity values. The parser reports the character position of the first error.
How much can I realistically save?
Pretty-printed JSON is typically 30-60% larger than minified, depending on nesting depth. After gzip the wire savings are smaller, but the parser still does less work on a smaller input.
Is my JSON uploaded anywhere?
No. All minification happens in your browser using the native JSON API. Nothing is sent to our servers, logged, or cached outside the current browser tab.
Does key order change?
No. The output is your original text with the whitespace removed, so keys stay in exactly the order you wrote them. If you need alphabetical sorting, use the JSON Formatter, which has a sort-keys button.
By continuing, you agree to our
Terms of Use and
Privacy Policy,
and confirm you are at least 13 years old.
You're offline
Check your connection. This page will reload on its own the moment you're back online.
Trying to reconnect...
Choose an imageUpload a new picture, or pick one you have used before.
Drag a picture hereAdd a photo from your phone
JPG, PNG, WebP or GIF. Big photos are made smaller for you. You can also paste a picture. You can crop it next.
Uploading
That did not upload.
Drop to upload
Your pictures
No picture matches that name.
Crop imageDrag to reposition · zoom to crop, or fit the whole image