Your data is never sent to a server or stored anywhere. All processing happens in your browser.

JSON Minifier (Compress JSON)

Minified output
 

How to Use


Paste JSON into the input area; whitespace, newlines, and tabs are stripped to produce the smallest possible payload. Original and minified byte sizes plus the savings percentage are shown so you can see the file-size impact at a glance.

Why Minify


Indented JSON is great for humans but wastes bytes on the wire. **Stripping whitespace shrinks the payload** for API responses, JSON-LD scripts, environment variables, CDN-cached files, and any place size matters. Mechanically this is just `JSON.parse` then `JSON.stringify` without an indent argument; the tool runs that pipeline in your browser.

Use Cases


  • Reducing API payload sizes
  • Compacting JSON-LD inside `<script type="application/ld+json">`
  • Passing single-line JSON via environment variables or CI/CD configs
  • Optimizing JSON files served from a CDN
  • Embedding JSON in HTML data attributes without bloating the markup

Privacy


Minification happens entirely in the browser; the input JSON never leaves your device. Safe for config files or API responses that may contain confidential values.

FAQ


What is the difference between minifying and formatting JSON?

Minifying strips whitespace, newlines, and tabs to produce the smallest possible payload, while formatting (beautifying) adds indentation to make it readable. This tool does the minify direction; use the JSON Formatter for the opposite.

Is it safe to paste config files or API responses with secrets?

Yes. Minification runs entirely in your browser — the JSON never leaves your device, and nothing is uploaded, logged, or stored. It is safe for config files or responses containing confidential values.

Does minifying change the meaning of my JSON?

No. The tool runs JSON.parse then JSON.stringify without indentation, so only insignificant whitespace is removed. Keys, values, ordering, and structure are unchanged.

What happens if my JSON is invalid?

Because it parses the input first, invalid JSON (trailing commas, unquoted keys, syntax errors) cannot be minified and will surface as an error rather than producing broken output. Fix the syntax and try again.

How much smaller will my JSON become?

It depends on how much indentation the original has. The tool shows the original size, the minified size, and the savings percentage so you can see the exact reduction for your input.