{"inline_business":{"json-formatter":{"repaired_success":"JSON Repaired & Formatted","repair_failed":"Could not automatically repair this JSON.","enter_valid_json":"Please enter valid JSON to view the tree structure.","download_failed":"Failed to download","fix":"Fix","code":"Code","tree":"Tree","valid_json_required":"Valid JSON required","upload_file":"Upload File","back_to_code":"Back to code","size":"Size:","x_bytes":"{{value}} bytes","length":"Length:","x_chars":"{{value}} chars","valid_json":"Valid JSON","invalid_syntax":"Invalid Syntax"}},"docs_business":{"tools":{"json":{"content":{"title":"Format, validate and repair JSON: what the tool actually does","intro":"Validation relies on the browser's JSON parser (JSON.parse), which enforces the strict RFC 8259 syntax: double quotes only, no trailing comma, no comments. Beautify re-indents with 2 spaces, Minify strips all optional whitespace, and Fix attempts three automatic repairs before validating again.","details":"

Operations

Example

The input {name: 'Kristools', 'tags': ['finance', 'sante',], actif: true,} is invalid. After Fix and Minify it becomes {\"name\":\"Kristools\",\"tags\":[\"finance\",\"sante\"],\"actif\":true}, 60 characters versus 86 in the indented version.

Limits

"}},"json-formatter":{"faqs":[{"question":"Why is my JSON invalid when it works in JavaScript?","answer":"JSON is stricter than a JavaScript object: keys and strings need double quotes, and trailing commas, comments and undefined are not allowed. The validator applies the RFC 8259 syntax and reports the position of the first error."},{"question":"What exactly does the automatic repair fix?","answer":"Three things: single quotes become double quotes, trailing commas before } or ] are removed, and unquoted keys (letters, digits, _) get quotes. An apostrophe inside text breaks the repair, so always review the result."},{"question":"Why does a large numeric ID change after formatting?","answer":"The browser stores numbers as double-precision floats, so integers above 9,007,199,254,740,991 (2 to the power of 53 minus 1) are rounded. 9007199254740993 comes out as 9007199254740992; store such IDs as strings."},{"question":"How much smaller does minification make a file?","answer":"It removes indentation and line breaks without changing the data. In the example on this page the object shrinks from 86 to 60 characters, 30% less; the saving grows with nesting depth."}]}}}}