JSON Minifier

Compress and minify JSON to reduce file size.

About the JSON Minifier

Paste formatted JSON and get the same data on one line with every unnecessary space removed, along with how much smaller it is.

Everything you enter is processed in your browser; nothing is uploaded or stored.

How to use it

  1. Paste your JSON.
  2. Press Minify.
  3. Check the size saving, then press Copy Minified JSON.

How JSON minification works

The JSON is parsed and written back out without indentation or line breaks. Whitespace inside string values is kept, because it is part of the data; only the formatting between tokens disappears.

Minified JSON is the same data, so any program reads it identically. It is smaller to store, send and embed – useful for API responses, local storage and query parameters.

Example

{ "id": 7, "tags": ["a", "b"] } becomes {"id":7,"tags":["a","b"]}, saving about half the characters.

Frequently asked questions

How do I minify JSON?

Paste it here and press Minify. The tool also checks that the JSON is valid.

Is minified JSON still valid?

Yes. Minifying only removes whitespace between tokens, so the data and its validity are unchanged.

How do I make it readable again?

Paste it into the JSON Beautifier to restore indentation.