Developer tool / 06
JSON Minifier
Validate JSON and remove insignificant whitespace to get a compact single line.
JSON Minifier: TOEA parses the input and serializes it without indentation, ensuring the result remains valid JSON. Runs 100% locally in your browser with zero server file uploads.
- Category
- Developer tools
- Runs
- In your browser
- Cost
- Free · no sign-up
- Availability
- Ready to use
Runs entirely in your browser
What else changes in the text
The values stay the same, but their spelling can change: 1.0 is written as 1, 1e2 as 100, and escapes such as \u00e9 and \/ as the plain characters é and /. Keys that are whole numbers, such as "10" or "2", move to the front of their object in ascending order, because that is how JavaScript orders them. If anything signed or hashed the original bytes, the minified copy will not verify.
Where compact JSON is needed
A single line suits places that cannot hold line breaks: an environment variable, a command-line argument, a CSV cell, a log line, or a JSON Lines file. To embed the result inside a string in code or in another JSON document, escape it with the JSON string escaper.
For API responses, turning on gzip or Brotli compression on the server saves far more than removing whitespace, since compressors already shrink repeated spaces to almost nothing.
How to use it
- Paste valid JSON.
- Choose Minify JSON.
- Copy or download the compact result.
Privacy & limitations
Processing is local. Values are unchanged, but keys that are whole numbers, such as "2", move to the front of their object, as JavaScript orders them.
Related tools
Frequently asked questions
Will it repair invalid JSON?
No. Invalid syntax is reported rather than silently changed.
Does it remove data?
It removes only formatting whitespace. Because values are re-serialized, 1.0 is written as 1, escapes become plain characters, and a duplicated key keeps only its last value.
Free tool · runs in your browser · no account required