How do I minify JSON?
Paste the JSON into the input field and press Minify. The compact, single-line version appears in the output panel, ready to copy.
Is it free?
Yes. No signup, no length cap, no run limit, since the conversion runs on your own device.
Is my data uploaded anywhere?
No, parsing and minifying happen entirely client side. Nothing is transmitted, stored or logged.
Does minifying alter any of my data?
No, only whitespace between structural characters is removed. Every key, value and array item remains exactly as it was.
Why does it report my JSON as invalid?
The pasted text doesn't follow JSON's syntax rules, most commonly a trailing comma, an unquoted key, or a comment, none of which standard JSON permits.
Does it accept JSON5 or JSONC with comments?
No, standard JSON supports neither comments nor trailing commas, so text in those relaxed formats needs both removed first.
Does it sort or reorder object keys?
No, keys retain the exact order they appeared in the input. Minifying only removes whitespace, it does not reorganise structure.
Is there a length limit on the input?
No. There's no cap and no run limit, only your device's own memory.
Does it work on phones?
Yes, the layout adapts to narrow screens.
What's the difference between this and the JSON prettifier?
This removes all unnecessary whitespace to minimise size. The prettifier does the reverse, adding indentation and line breaks for readability.
Does minifying confirm the data is correct, not just valid syntax?
No, it only confirms the syntax parses. It cannot determine whether a value is wrong, a field is missing, or a number should have been a string.
Does minifying alter the JSON in any lossy way?
No, the result describes exactly the same data as the input. Minifying is a lossless transformation with respect to the data itself.
Can I minify an array rather than an object?
Yes, any valid JSON value, an object, an array, a string, a number, minifies identically.
Is there an API or batch mode?
Not currently. This is a single-paste, browser-based tool.
Does it strip comments from my JSON?
It cannot, since standard JSON does not support comments at all, so a file containing them fails to parse rather than having them stripped.
Why minify rather than deleting line breaks manually?
A manual find-and-replace can corrupt string values that legitimately contain a line break or extra spaces. This tool parses the structure first, so it never touches a string value incorrectly.
Does it handle Unicode characters and emoji correctly?
Yes, valid JSON string content passes through unchanged, since minifying affects only whitespace between structural characters.
Is confidential data safe to paste here?
Yes, nothing is transmitted anywhere. Processing happens locally in your browser.
How much smaller does minifying make a file?
That depends entirely on how much whitespace the original carried. A heavily indented, deeply nested file shrinks more than one that was already fairly compact.
Can the minified output be used directly in code?
Yes, minified JSON is exactly as valid as pretty-printed JSON to any parser. The formatting change has no bearing on how it is consumed.