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
- Paste formatted JSON into the editor.
- Press Minify (Ctrl/Cmd + Shift + M).
- 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
- JSON Formatter
- JSON Validator
- JSON Minifier
- JSON Repair
- JSON Diff
- JSON Schema Validator
- JSON to YAML
- YAML to JSON
- JSON to CSV
- CSV to JSON
- JSON to XML
- XML to JSON
- YAML Formatter
- XML Formatter
- JSONL Validator
- JSON to TOON
- LLM Token Counter
- LLM Token Optimizer
- JSON to TypeScript
- JSON Schema Generator
- LLM Tool Schema Generator