Tool Logo

JSON Minifier

Make JSON as small as possible without changing the data.

0 characters

Loading tool…

How to use the json minifier

Minifying removes every space, tab and line break that JSON doesn't need, giving the smallest valid version of your data. You see the original and minified size and the percentage saved. The data itself is untouched: the minified JSON parses to exactly the same values.

  1. Paste or upload your JSON.
  2. Check the size saving shown under the result.
  3. Copy the minified JSON.

When to use it

  • Smaller payloads

    Shrink fixtures, config or data sent over the network.

  • Storage

    Store JSON in a database field or local storage using less space.

  • Embedding

    Put JSON on a single line inside HTML, env variables or scripts.

Frequently asked questions

Does minifying change my data?

No. Only whitespace outside strings is removed. Spaces inside string values are kept, and the result parses to the same data.

How much smaller will my JSON get?

It depends on how much indentation it had. Pretty-printed JSON often shrinks by 20 to 40 percent; JSON that is already compact barely changes.

Can I turn minified JSON back into readable JSON?

Yes. Use the JSON Formatter to indent it again; the content is identical.

What happens if my JSON is invalid?

You'll see the error instead of a result, because only valid JSON can be minified safely. The JSON Validator shows exactly where the problem is.

Is my JSON uploaded?

No. Everything runs in your browser; nothing you paste or upload is sent to our servers.