FAQ
What is the difference between Minify and Escape?
Minify removes whitespace and keeps valid JSON. Escape turns the whole document into a string literal you can embed in code.
Does minifying lose any data?
Whitespace itself carries no meaning, so removing it changes nothing. But the output is re-serialised after parsing: 1.0 becomes 1, 1e3 becomes 1000, duplicate keys keep only the last one, and integers past 2^53 (IDs of 18+ digits) are rounded to a double. Keep such fields as strings.
How much smaller does it get?
It depends on the original indentation. A 4-space indented API response often shrinks by 30% or more.
About this tool
All five actions (minify, format, escape, unescape, validate) run JSON.parse first, so "minify" is not whitespace stripping — it is parse and re-serialise. That distinction has consequences: 1.0 becomes 1, 1e3 becomes 1000, \u00e9 becomes the character é, duplicate keys keep only the last one, and integers beyond 253 (9007199254740992) are rounded to a double — 18–19 digit snowflake IDs and order numbers come out as different digits. Confirm such fields were strings to begin with.
"Escape" produces a single line you can paste straight into a string literal: it is minified first, then \ and " become \\ and \". If the input is not valid JSON it degrades to collapsing newlines into spaces before escaping, without an error. That fallback is intentional (it lets you escape half-finished text), but it means "escape succeeded" is not the same as "the JSON is valid".
"Unescape" restores only \" and \\; \n, \t and \uXXXX are left alone. It targets strings lifted out of source code, not full JSON string decoding — to decode \u escapes properly, run the text through the Unicode converter or a JSON parser once.
After minifying, the status bar shows original bytes, result bytes and the percentage saved. Deeper indentation saves more (roughly 10–20% for 2-space output); content that is already minified barely changes, and a percentage of nearly zero tells you the size is not in whitespace at all.