JSON Minifier
Squeeze JSON into one compact line and see how much smaller it got. The tool runs in your browser, so request bodies and configs never leave your device.
- Nothing to install
- Stays in your tab
- Shows bytes saved
- Numbers never rounded
- Runs on your device. Files are never uploaded.
- Free and unlimited. No sign-up, no watermark.
JSON minifier in three steps
No account, no email, no waiting for an upload.
- STEP 01
Bring in your JSON
Use the box, or open a .json, .geojson or .txt file.
- STEP 02
Set optional extras
Sort keys if you want a stable order, or escape non-ASCII characters as \u codes.
- STEP 03
Copy the one-liner
Copy the compact JSON or download it. The note shows the size before and after, with the percent saved.
What JSON minifier does, and what it doesn't
We'd rather tell you up front than surprise you after the download.
What you get
- True minificationAll whitespace outside strings is removed. Text inside strings is never touched.
- Size reportSee bytes before and after and the percentage saved, so you know whether it was worth it.
- Validates as it goesBroken JSON stops with the line and column, so you never minify something invalid.
- Exact numbersLarge integers and decimals are written back exactly as they appear in your source.
- Optional key sortingSorted keys give you identical output for identical data, which helps with caching and checksums.
Good to know
- Minifying is not compressionIt removes whitespace only. Servers usually add gzip or Brotli on top, which shrinks the file much further.
- No comments allowedJSON has none. A file with comments is reported as an error. Strip them first, then minify.
- Hard to read afterwardsKeep a formatted copy. You can restore the layout any time with the JSON beautifier.
Your data never leave your device
The tool runs inside your browser instead of on our servers, so there is nothing to upload, store or delete afterwards.
Typical online tool upload
Your file travels over the internet, sits on someone else's computer for a while, and you wait for the upload and the download.
Mediaextractr no upload
The tool loads into your browser once, then works on your file locally. Nothing is sent, so nothing can leak.
When people use JSON minifier
Put JSON in a query or header
Compact JSON fits better into a URL parameter, an environment variable or a curl command.
Trim a static file
Shrink a bundled JSON asset before shipping it with your app.
Store compactly
Save one record per line or keep a smaller fixture file in your repo.
Embed in HTML
Inline JSON-LD or settings inside a page without extra whitespace.
Mediaextractr vs typical upload tools
| MediaextractrPrivate | Typical upload tools | |
|---|---|---|
| Your file is uploaded | Never | Yes |
| Sign-up needed | No | Often, after a few files |
| Daily file limit | None | Often 1–2 free files |
| Watermark | Never | Sometimes |
| Wait for upload & download | No | Yes |
| Speed on very large files | Depends on your device | Depends on their servers |
What minifying removes
Spaces, tabs and line breaks between tokens are dropped. Keys, values and their order stay exactly as they were, so a parser sees the same data before and after.
Savings depend on how the file was indented. A deeply nested file with 4-space indentation can shrink by a third or more, while an already compact one barely changes.
Use it safely
A few checks keep minified JSON trustworthy:
- Validate first. This tool does it for you and points to the error.
- If you will embed the result in a string in code, run it through JSON escape.
- For URLs, follow with URL encode.
- Keep the formatted original in version control, not only the minified one.
When not to minify
Skip minifying files that people edit by hand, such as configs and fixtures in a repository, because readable diffs matter more than a few saved bytes. Minify at build time or for payloads sent over a network, and keep the readable source.
Questions, answered
How do I minify JSON?
Paste it, then copy the one-line result. The page shows how many bytes you saved.
Does minifying my payload expose it to a third party?
No. Whitespace is stripped by code running in this page. Nothing is posted, so request bodies and configs stay private.
Does minifying change my data?
No. Only whitespace between tokens is removed. Strings, numbers and key order stay the same.
Is minified JSON the same as compressed JSON?
No. Minifying removes whitespace. Compression such as gzip works on top and is usually done by your web server.
Can I minify a large file?
Yes, within what your device's memory allows. Very large files may be slow on a phone.
Will it run on iPhone and Android?
Yes, in the current browsers on both. Very large files depend on the memory of your device.