How json minify works
This tool takes a pretty-printed or whitespace-heavy JSON document and returns the smallest possible equivalent JSON by removing every space, tab, and newline that is not inside a string. The output is a single compact line that parses to exactly the same value.
Paste your JSON and the tool first parses it to confirm it is valid. If parsing fails, it reports the error and produces no output. If parsing succeeds, it serializes the parsed value back out with JSON.stringify and no indentation, which drops all non-essential whitespace.
Minifying JSON reduces file size, which speeds up network transfer and storage. The transformation is exactly the inverse of the JSON Formatter, which expands compact JSON into a readable, indented view.