JSON Formatter
JSON Formatter for developers — instant, offline-style and privacy-safe.
Minify JSON — strip every bit of insignificant whitespace down to one compact line — right in your browser. It truly parses the JSON, so invalid input is caught.
Your browser is preparing the tool. It runs 100% locally.
Paste JSON and the tool removes every space, tab and line break that is not inside a string, collapsing the data to one compact line. Unlike a regex tidier, it genuinely parses the JSON first, so the output is guaranteed valid and any malformed input is rejected with an error. It is the quick way to shrink a config or an API payload for transfer. Everything runs in your browser; nothing is uploaded.
This tool takes formatted, indented JSON and compresses it into the smallest equivalent text: a single line with no insignificant whitespace. The data is identical — only the spacing used to make it readable is removed.
It is the quick way to prepare JSON for somewhere size matters: an API request body, a config embedded in code, a cache value, or a query parameter, where indentation is wasted bytes.
The tool parses your text into a real data structure and then serialises it straight back out with no spacer between keys, values and elements. Because it round-trips through an actual parse, the result is always valid JSON, and any whitespace that was only there for readability simply does not get written back.
That parse step is the important difference from a regex stripper. The tool understands strings, so spaces inside a string value are preserved, while the spacing between structural tokens is dropped. If the input is not valid JSON, the parse fails and the tool reports the error rather than producing broken output.
parse the text into data, then serialise with no spacer
• drop spaces, tabs and newlines between tokens
• keep all whitespace inside string values
• invalid JSON is rejected, not guessedBefore: { "id": 7, "tags": [ "pdf", "image" ] }
After: {"id":7,"tags":["pdf","image"]}The data is unchanged — only readability whitespace is removed. Because it parses, a comment, a trailing comma or a single-quoted key (none of which are valid JSON) makes it report an error instead of minifying.
Your JSON never leaves your device. It is parsed and minified in your browser with no network request, so nothing is uploaded.
Because the work is local, you can safely minify payloads or configs that contain tokens, keys or internal data without them being stored or sent anywhere.
Nothing persists between sessions — close the tab and the input and output are gone.
Because it parses and re-serialises, the output is always valid JSON representing exactly the same data — there is no risk of it producing broken output from valid input, unlike a regex-based stripper.
Validity is enforced, so anything that is not strict JSON is rejected. JSON with comments or trailing commas (sometimes called JSONC or JSON5) will not minify here; remove those first or use a tool that supports them.
Very large integers can shift. Numbers beyond the safe integer range are stored as floating point, so a 20-digit identifier may come back rounded. Keep such values as strings if exactness matters.
Duplicate keys collapse to the last one, because the parser builds an object where each key appears once. That matches how JSON parsers behave generally, but it means a minified object can have fewer keys than the text you pasted.
Compress a request or response body to save bytes over the wire.
Inline a compact config without multi-line indentation.
Store JSON compactly in a cache, cookie or database field.
Catch invalid JSON, since the tool parses before it compresses.
To go the other way and indent JSON for reading, use a JSON formatter. For JSON with comments or trailing commas, strip those or use a JSON5-aware tool. To keep huge identifiers exact, store them as strings before minifying.
Minifies by genuinely parsing the JSON and re-serialising it with no spaces, so it also validates as a side effect; honest about the parse-level limits it shares with any JSON tool.
JSON Formatter for developers — instant, offline-style and privacy-safe.
JSON Validator for developers — instant, offline-style and privacy-safe.
Base64 Encoder for developers — instant, offline-style and privacy-safe.
Fast, free Hash Generator that runs entirely client-side in your browser.
Fast, free UUID Generator that runs entirely client-side in your browser.
Fast, free CSS Minifier that runs entirely client-side in your browser.
It is free, private and runs entirely in your browser — no sign-up, no uploads, no limits.