Developer tools ● Local processing

JSON Minifier

Remove JSON formatting whitespace while preserving values; duplicate property names and numbers JavaScript would change are rejected.

Preparing tool…
Try a small example

Try a small example

Load the fictional example in a cleared form. Check the options, run the tool if needed, and compare the result below.

Remove optional JSON whitespace after parsing and serializing the values. Duplicate property names are rejected so the browser cannot silently discard earlier values. Paste JSON and select Minify JSON. The output removes optional whitespace and keeps the parsed values. If an object repeats a property name (including the same name written with a Unicode escape), the tool stops rather than silently dropping a value. Syntax errors include a line and column when the browser provides a position; numbers that JavaScript cannot preserve exactly are also rejected. JSON object names should be unique; parser behavior for duplicates differs. Numbers that JavaScript would change are also rejected. Comments and trailing commas are invalid JSON, and application-specific schema rules are not checked.

JSON input

{
  "name": "Ada",
  "tags": ["tea", "coffee"]
}

Expected output

{"name":"Ada","tags":["tea","coffee"]}

The example is unavailable until the tool is ready.

Text is processed in your browser.

✓ Local processing✓ No account✓ Inputs processed here✓ Free

Quick answer

Remove optional JSON whitespace after parsing and serializing the values. Duplicate property names are rejected so the browser cannot silently discard earlier values.

The page and its assets load from the site; this operation uses your entered values only in this browser and does not send them to a calculation endpoint.

How to use it

Paste JSON and select Minify JSON. The output removes optional whitespace and keeps the parsed values. If an object repeats a property name (including the same name written with a Unicode escape), the tool stops rather than silently dropping a value. Syntax errors include a line and column when the browser provides a position; numbers that JavaScript cannot preserve exactly are also rejected.

Limits

JSON object names should be unique; parser behavior for duplicates differs. Numbers that JavaScript would change are also rejected. Comments and trailing commas are invalid JSON, and application-specific schema rules are not checked.

Frequently asked questions

Why are repeated property names rejected?

The JSON specification recommends unique names, but parsers can handle duplicates differently. This browser parser keeps only the last value, so the minifier stops rather than silently dropping earlier values.

Why are some numbers rejected?

JavaScript cannot represent every JSON decimal exactly. The minifier refuses numbers that would change when parsed and written, instead of rounding them.

Sources and references

These references document the cited standard or browser API; they do not validate the tool’s output.