JSON Minifier

Remove all spaces and line breaks from JSON to make it as small as possible, and see how many bytes you saved.

Processed on your device. Files are not uploaded

How to minify JSON

  1. Paste your JSON

    Paste or type it into the box, or press Try an example.

  2. Read the saving

    The size before and after is shown.

  3. Copy or download

    Use the compact JSON where size matters.

Worked example

This is what JSON Minifier gives for its own sample values. Open the tool above and change anything to try your own.

JSON

{
  "name": "sarva-tools",
  "version": "1.2.0",
  "private": true,
  "author": { "name": "Ada", "email": "ada@example.com" },
  "keywords": ["tools", "developer"],
  "scripts": { "build": "next build", "test": "vitest run" }
}

Minified JSON

{"name":"sarva-tools","version":"1.2.0","private":true,"author":{"name":"Ada","email":"ada@example.com"},"keywords":["tools","developer"],"scripts":{"build":"next build","test":"vitest run"}}

About JSON Minifier

Remove every space and line break from JSON to make it as small as possible for storage or transport. The data is unchanged, and invalid JSON is reported instead of being minified.

FAQs

Does minifying change the data?

No. Only whitespace is removed.

Can I make it readable again?

Use JSON Formatter & Validator.

Is it the same as gzip?

No. Minifying removes whitespace, while gzip compresses the bytes. They can be used together.

Related tools