WebToolsForAll

Tools / Formatters & Beautifiers

JSON minifier

Remove JSON layout whitespace after the value passes strict checks.

Input

0 UTF-16 code units

Optional local draft

Saving stores a plaintext draft in this browser on this device. Do not save secrets or use this on a shared device. Nothing is saved or loaded automatically. Reset does not delete a saved draft; use Delete local draft.

No draft has been loaded.

Import a local text file

Output

Work through the task

Remove layout whitespace after a strict JSON value passes validation.

  1. Paste JSON, then choose Minify.
  2. Whitespace inside string values stays part of those values. Keep the source if its original lexical formatting matters.
  3. Review the result before copying or downloading. Editing an input invalidates the previous result; keep an original if the transformation matters.

Example to check

The string value "keep  spaces" retains both interior spaces after minification.

Limits and output behavior

Up to 100,000 input characters, 10,000 values and 40 data levels. Strict JSON rejects duplicate keys, trailing commas, nonfinite numbers and unsafe integers; quote large identifiers to retain their digits.

Troubleshooting

Minification starts only after strict parsing. Fix the reported invalid token, duplicate key or exceeded limit; the minifier does not silently drop invalid content.

Questions

Are spaces inside a string removed?

No. Layout outside string values is compacted. Spaces that belong to a decoded string remain its data.

Input and privacy

Processing runs in this browser. Inputs are not saved automatically. An explicitly chosen local draft, where offered, is plaintext storage on this device. Downloaded files, clipboard contents and browser extensions have separate retention behavior.