JSON Minifier

Remove structural whitespace from valid JSON while retaining spaces inside strings.

Keep numeric tokens intact while compacting JSON

Try {"id": 9007199254740993, "label": "two words"}. This tool removes structural spaces, preserves the original numeric token, and keeps the space inside the label. That difference matters if an external system treats the ID as exact text.

If you need to inspect nesting before sending the payload, work from a separate formatted copy. Minifying alone only changes layout. It will not fix invalid syntax or explain whether a receiving service accepts the payload.

Compact JSON without rounding a large ID

Compare the original and output digit for digit. This is the literal stored in the compact JSON string. A later parser may still round it if it stores numbers as JavaScript Number values.

{ "id": 9007199254740993, "label": "two words" }

Expected output

{"id":9007199254740993,"label":"two words"}

Common questions

Will spaces within a string be removed?
No. Only structural whitespace outside quoted strings is removed.
Will large number literals be rewritten?
The input is validated first, then its original number tokens are preserved during whitespace removal.

The tool processes your input in this browser. It does not upload the input itself.