JSON Minifier

Strip whitespace and line breaks without changing the data.

Minifying JSON removes the indentation, spaces and line breaks that exist only for human readers. The data is identical, but the payload is smaller, which reduces transfer size for APIs, fits more into environment variables and message queues, and lowers the token count when the JSON is pasted into an LLM prompt.

The status bar under the editor shows bytes, lines and characters so you can see the difference before and after. Press Format at any time to expand the document again.

How to use it

  1. Paste formatted JSON into the editor.
  2. Press Minify (Ctrl/Cmd + Shift + M).
  3. Copy the single-line result or export it as a file.

Questions

Does minifying change my data?

No. Only insignificant whitespace is removed. Keys, values and their order are preserved, and whitespace inside string values is left untouched.

How much smaller will it get?

It depends on nesting depth. Deeply indented documents commonly shrink by 20 to 40 percent; flat documents shrink less.

Does minified JSON use fewer LLM tokens?

Yes, usually noticeably fewer. Open the token counter panel to compare pretty JSON, minified JSON, YAML and TOON for your actual document.

All tools