JSON minifier

Validate JSON and remove formatting whitespace.

Private: it runs in your browser and what you type is never sent anywhere. How to check it

Your files are processed here, on your device

We do not send the contents of your files or text to any server: everything is processed in your browser’s memory. No account is needed, there is no daily quota and we use no analytics or trackers. Each tool has size limits to protect your device’s memory.

A connection is only needed to load the site. After that you can disconnect and the tools keep working (some previews may need the connection). Hosting may receive technical visit data. Favorites store only tool identifiers in this browser.

How we handle your data →

How to use this tool

  1. Paste a valid JSON document.
  2. Minify to remove formatting whitespace outside strings.
  3. Review large numbers and duplicate keys before using it in another system.

An example you can verify

Remove JSON formatting while preserving whitespace inside strings.

Example input

{ "text": "a  b", "n": 1 }

Expected result

{"text":"a  b","n":1}

Minification is neither encryption nor ZIP compression. JSON is validated before output is produced.

JSON minifier: uses and practical guidance

Minifying JSON removes indentation and formatting breaks to produce a compact representation. It is useful when a technical field expects one line or when surrounding whitespace adds size without carrying data. The process is different from ZIP or gzip file compression. It serializes a valid parsed structure without readability formatting around its values. The resulting string is compact JSON rather than a compressed binary archive or a new data format.

Spaces inside strings belong to their contents and remain. An address or sentence should not lose word separation merely because outside indentation disappears. Input must follow JSON rules; comments and trailing commas are not accepted. If the source is a JavaScript object expression, making it one line does not automatically make it valid JSON. Determine the actual source format before assuming it can be pasted into a JSON parser unchanged.

The tool uses the browser parser, including its numeric precision and duplicate key behaviour. Very large integers can change, and repeated properties retain their final value. That distinguishes serialization of parsed data from a purely textual whitespace removal. Keep the source when exact bytes, signatures or representations beyond parser precision must be preserved. A successful minification confirms accepted syntax, not exact byte equivalence with every possible input document.

Inspect a string containing spaces, a significant number and the length of an array after processing. Format a copy with the companion tool for easier review, remembering the same parsing restrictions. If the goal is reduced application transfer, server compression is a separate decision. Retain a readable configuration for editing and use the compact version only where it serves the receiving workflow. Verify that the destination receives the complete string rather than a truncated copy.

A practical check before using the result

A minification trial should include a sentence with spaces inside a string and an array with several items. Verify that sentence spacing survives and array elements remain. For size comparison, measure bytes using the selected encoding rather than only the visible length of one line. Compact output can be less readable without being substantially smaller when little formatting existed initially. Retain the editing version and identify which copy the destination will use. If a signature depends on exact bytes, do not assume parsing and serializing preserves its required original sequence. A compact representation and a byte faithful representation are different properties worth checking separately.

Settings and limits

Paste valid JSON. The result is serialized without indentation or line breaks; spaces inside strings are preserved.

Frequently asked questions

Is this file compression?

No. It removes unnecessary formatting. The browser parser retains the last duplicate key and uses JavaScript number precision.

Is it free, and do I need to sign up?

Yes, it is free. You do not need to sign up, create an account or install an app, and there is no daily quota: open the tool and use it. The only limits are file sizes, which protect your device’s memory.

Is my data sent to any server?

No. What you type or paste is processed in your browser’s memory and is not sent to any server. You can check it in the browser’s Network tab or by going offline after the page has loaded.

Guides