Strip the whitespace and line breaks from JSON to get the smallest valid output. Strings and numbers stay exactly as written, and the JSON never leaves your browser.
Add to Chrome Free: formats JSON pages right in the tab.
.json file onto
it, or load it from a URL.
.json file, or share it as a
link. Format makes it readable again.
Spaces, tabs and line breaks between tokens are removed. Whitespace inside strings is part of the data and stays.
1.50, 1e21 and
12345678901234567890 are kept digit for digit instead of
being rewritten by JSON.parse.
Minify works only on valid JSON, so a broken document is reported with the line and column of the error instead of being mangled.
Each Minify is saved in History, and Format indents the JSON again at any time.
No. Only whitespace outside strings is removed. Keys, values and their order are unchanged, and numbers keep the exact digits you pasted.
Press Format: it indents the JSON with two spaces. JSON you paste is formatted automatically.
Files up to about 10 MB work smoothly. Minifying runs in a background worker, so the page does not freeze.