JSON Minifier

Paste JSON and click Minify to squeeze it onto one line with no extra whitespace. The data stays exactly the same; only the formatting goes.

Editor (Formatted View)
1
Ready — paste or type JSON here
Viewer
Tree view will appear here after formatting
Ready

How to minify JSON

  1. Paste JSON into the editor or open a file.
  2. Click Minify. Spaces, tabs and line breaks between values are removed; spaces inside strings are kept.
  3. Copy the result. Click Format to make it readable again at any time.

How much smaller does it get?

Pretty-printed JSON with 2-space indentation is typically 20–40% larger than its minified form, and more for deeply nested data. For example:

{
  "id": 42,
  "tags": [
    "new",
    "sale"
  ]
}

becomes {"id":42,"tags":["new","sale"]}.

When to minify

If your server already compresses responses with gzip or Brotli, minifying saves less, because compression removes most repeated whitespace too. It still helps with memory and parsing speed.

Safe and exact

Minifying never changes values: strings, key order and long numbers stay exactly as they were. If the JSON has a syntax error, you're told where it is, and Repair can fix common mistakes first. Everything runs in your browser.

Frequently asked questions

Does minifying JSON change the data?

No. Only whitespace between tokens is removed. Strings, numbers, key order and nesting are unchanged, so parsing the minified JSON gives exactly the same data.

How do I un-minify JSON?

Click Format. The minified JSON is re-indented with 2 spaces, 4 spaces or tabs, whichever you choose.

Is minifying the same as compressing?

Not quite. Minifying removes formatting characters, while compression (gzip, Brotli, zip) encodes the data more efficiently. They work well together.

Can I minify invalid JSON?

Invalid JSON is reported with its line and column first. Use Repair to fix common problems, then minify.

Is my JSON uploaded?

No. Minifying runs in your browser.

Other tools

Share Content

Choose what to share and generate an instant link

🔥 One-time link Content deleted from server after first view
✉️
Uploading to server…