π§Ύ JSON Minifier β Remove Whitespace Safely
Paste a JSON document to strip insignificant whitespace. The minifier parses first, so comments are rejected and strings keep their escaped characters.
How it works
- Paste JSON. Trailing commas and comments are not valid JSON and will be flagged.
- Press Minify JSON. The page parses the document, then serializes it with no added spaces.
- Compare character counts to see how much formatting whitespace was removed.
Examples
- {"a": 1, "b": [2, 3]} minifies to {"a":1,"b":[2,3]}.
- A trailing comma such as {"a":1,} is reported as invalid.
- Strings keep internal spaces; only structural whitespace is removed.
Frequently asked questions
Is this the same as a JSON formatter?
A formatter adds indentation for reading. This tool removes that formatting so the document is smaller to paste into configs, query strings or fixtures.
Will key order change?
Keys stay in the order the parser returned them, which in current browsers is the order they appeared in the object.
Is the JSON uploaded?
No. Parsing and serialization happen locally with JSON.parse and JSON.stringify.
Related tools
More JSON tools βJSON Formatter & Validator
Format, validate and minify JSON instantly. Precise error location with line and column, key sorting, 2/4-space or tab indent, and file download. Free.
JSON String Escape
Escape text for JSON or unescape a JSON string literal in the browser.
Background Remover
Remove the background from a photo and save a transparent PNG β free, private, no sign-up.
QR Code Generator
Make QR codes for links, Wi-Fi, UPI, WhatsApp and more β free PNG and SVG downloads.