gizmobench
BrowseDaily

JSON Minifier

Remove JSON formatting whitespace and copy the compact result. This page opens in Minified mode with a small example; paste your own object, array or other JSON value over it. A long numeric ID keeps every digit because output comes from the original tokens, and spaces inside strings remain data. The input stays editable while the preview and Copy minified use the same compact output.

Minified3 keys · depth 2
{"id":9007199254740993,"message":"keep these spaces","items":[1,2,3]}
Show
Indent
Keys
Size
85 bytes

Common questions

How do I minify a JSON file?
Open the file as text in your editor, paste its contents here and use Copy minified. This page has no file picker or download button; paste the copied text into the destination file. Switch Show to Formatted if you want to inspect the structure before copying.
What does compact JSON remove?
Only whitespace outside string tokens: indentation, line breaks and spaces around punctuation. It keeps string escapes, spaces inside strings, number spellings such as 1.0 or 1e3 and key order unless you turn on sorting. Escaped newline characters inside strings remain escaped characters.
Does minifying compress or escape the payload?
It removes formatting bytes but does not apply gzip, ZIP or another compression format. It also does not add the extra escaping needed to embed JSON as a string literal, in HTML or in a URL. Keep those transport steps separate.
Can it minify JSON with comments or several log records?
No. Strict JSON permits no comments or trailing commas, and this page expects one complete JSON value. Fix the reported syntax error first. For several line-delimited records, process each record separately; the page does not combine or stream them.
Does it change arrays or large numbers?
Array order and every number token stay as written. A value such as 9007199254740993 stays numeric text with all its digits; another application may still round it when it parses the copied JSON. Quote IDs in the source if their type is a string.

Formatting and minification preserve original string and number tokens. Object keys stay as written unless sorting is enabled; sorted keys are compared by decoded name, without case, while array order stays unchanged. Syntax checking is separate from schema validation.