Minify a JSON document

For anyone reducing a payload before transfer, testing or integration, JSON Minifier produces a compact copy of valid data.

Minify valid JSON by removing unnecessary spacing and produce a compact document ready for transfer. You get the result directly in your browser.

How to use

  1. Paste the valid JSON document you want to shrink into the input area, or import the matching file.
  2. Run the minifier: spaces, line breaks and indentation are removed from the document.
  3. Take the compact version shown in the result panel and copy it.
  4. Check that the compact document is still valid by running it through a formatter if needed.
  5. Keep the indented version somewhere, because you will certainly need it for maintenance later.

Example

The sample is a small object with a message and a flag. After minifying, check that the quotes and braces are still in place and that the content is strictly unchanged: only the layout should differ, never the values themselves.

Input

{
  "message": "Hello",
  "active": true
}

Output

{"message":"Hello","active":true}

Limits and formats

Where processing happens

Minification runs in your browser on the text you paste or the file you import. Nothing is sent out and nothing remains once the tab is closed, so business data can be compacted without being passed around.

Frequently asked questions

Does minifying change any values?

No, only unnecessary spaces and line breaks are removed. Text inside strings, numbers and booleans should stay exactly the same, and comparing both versions is a quick way to confirm that nothing else moved.

What if my JSON is rejected?

Fix the syntax in a formatter first, then come back to compress it. An invalid document cannot be reduced reliably, and the error needs to be dealt with before any other operation is attempted.

Will the minified file load faster?

It is smaller, which can shorten transfer time, especially when the original carried a lot of indentation. On small objects the gain stays modest and depends mostly on how your caching is set up.

Tools in the same category