Minify JSON Online

Minify JSON online by stripping whitespace and line breaks. Shrink payloads for APIs, configs and bundles without changing the data. Free and private.

Part of the free JSON Formatter & Validator. Runs in your browser — nothing is uploaded.

Minify JSON Online

Pretty-printed JSON is great for humans but wasteful on the wire. The minifier removes every unnecessary space and newline so the same data takes fewer bytes. Use it for API fixtures, embedded config and anything you ship to browsers.

Worked example: Pretty JSON to a single compact line

Input (formatted)

{
  "name": "my-app",
  "version": "1.0.0",
  "scripts": {
    "dev": "next dev",
    "build": "next build"
  },
  "dependencies": {
    "next": "14.2.0",
    "react": "18.3.1"
  }
}

Minified output

{"name":"my-app","version":"1.0.0","scripts":{"dev":"next dev","build":"next build"},"dependencies":{"next":"14.2.0","react":"18.3.1"}}

Practical tip

Minify at build time and serve with gzip or Brotli. Compression handles repeated keys well, so minifying and compressing together gives the smallest payload.

How to use this JSON Formatter

  1. 1Use the live tool above — it runs entirely in your browser and never uploads your data.
  2. 2Paste the sample from the worked example, or use your own input.
  3. 3Copy the result, then adapt the same steps in your editor, script, or pipeline.

Minify JSON Online FAQs

How much smaller does minified JSON get?

Savings depend on indentation depth. Heavily nested, 4-space-indented files often shrink by 20–40% before gzip is applied.

Can I turn minified JSON back into readable JSON?

Yes. Paste the compact JSON and click Format / Beautify. No information is lost because only whitespace was removed.

More JSON Formatter pages

Open the full JSON Formatter tool →