[{"data":1,"prerenderedAt":102},["ShallowReactive",2],{"tool-guide:json-formatter":3},{"overview":4,"whatIs":5,"useCases":6,"steps":12,"commonMistakes":17,"relatedStandards":23,"comparison":36,"example":79,"limitations":83,"faq":86},"JSON Formatter turns compact or hard-to-read JSON into a consistent representation and reports the exact parse location when the input is invalid.","JSON (JavaScript Object Notation) is a lightweight data-interchange format that uses human-readable text to store and transmit structured data. It was originally derived from JavaScript but is now language-independent and supported by virtually every programming language and platform. JSON represents data as key-value pairs (objects) and ordered lists (arrays), with values limited to strings, numbers, booleans, null, objects, and arrays. Its simplicity makes it the dominant format for REST APIs, configuration files, log events, and data storage. A JSON formatter takes compact, single-line JSON and adds consistent indentation and line breaks so the hierarchical structure becomes visible at a glance. Formatting does not change the data — only the whitespace. When the input contains a syntax error, a good formatter pinpoints the exact line and column of the first problem so you can fix it immediately instead of guessing.",[7,8,9,10,11],"Debugging API responses — paste a minified JSON payload from a network inspector to see the structure and spot missing or unexpected fields.","Reviewing configuration files — format a CI\u002FCD config, package.json, or Terraform plan output before committing to catch structural mistakes.","Validating webhook payloads — paste the raw body from a webhook log to verify the JSON is syntactically correct and the fields match your schema.","Preparing documentation examples — beautify JSON snippets before pasting them into README files, wikis, or Confluence pages.","Minifying before transmission — compact a large JSON object to reduce payload size for a POST request or a message queue event.",[13,14,15,16],"Paste or type a JSON value into the input editor.","Choose beautify (pretty-print with 2-space indent), minify (remove all whitespace), or validate (check syntax without reformatting).","Run the transform. If a syntax error exists, the tool highlights the exact line and column so you can fix it.","Copy the formatted output to your clipboard or download it as a .json file.",[18,19,20,21,22],"Trailing commas — JSON does not allow a comma after the last element in an array or object. JavaScript does, so this is the most common copy-paste error.","Single quotes — JSON requires double quotes around keys and string values. Single-quoted strings are a syntax error.","Unquoted keys — unlike JavaScript object literals, JSON keys must be wrapped in double quotes.","Comments — JSON has no comment syntax. If you need comments, consider JSON5 or JSONC (which some editors support), but standard JSON parsers reject them.","Confusing JSON with JavaScript — JSON is a strict subset. Functions, undefined, NaN, Infinity, and template literals are not valid JSON values.",[24,27,30,33],{"title":25,"url":26},"RFC 8259 — The JSON Data Interchange Format","https:\u002F\u002Fdatatracker.ietf.org\u002Fdoc\u002Fhtml\u002Frfc8259",{"title":28,"url":29},"ECMA-404 — The JSON Data Interchange Syntax","https:\u002F\u002Fecma-international.org\u002Fpublications-and-standards\u002Fstandards\u002Fecma-404\u002F",{"title":31,"url":32},"JSON Schema — vocabulary for annotating and validating JSON","https:\u002F\u002Fjson-schema.org\u002F",{"title":34,"url":35},"MDN — JSON.parse() reference","https:\u002F\u002Fdeveloper.mozilla.org\u002Fen-US\u002Fdocs\u002FWeb\u002FJavaScript\u002FReference\u002FGlobal_Objects\u002FJSON\u002Fparse",{"heading":37,"columns":38,"rows":43},"JSON vs YAML vs XML vs TOML",[39,40,41,42],"JSON","YAML","XML","TOML",[44,50,56,63,70,75],{"label":45,"values":46},"Readability",[47,48,49,47],"Good","Excellent","Verbose",{"label":51,"values":52},"Comments",[53,54,55,54],"No","Yes (#)","Yes (\u003C!-- -->)",{"label":57,"values":58},"Data types",[59,60,61,62],"6 types","6+ types","Text only","7 types",{"label":64,"values":65},"Common use",[66,67,68,69],"APIs, configs","Configs, CI\u002FCD","Legacy APIs, docs","Configs (Rust, Go)",{"label":71,"values":72},"Parsing speed",[73,74,74,73],"Fast","Moderate",{"label":76,"values":77},"Whitespace-sensitive",[53,78,53,53],"Yes (indentation)",{"label":80,"input":81,"output":82},"Format a compact object","{\"service\":\"ledger\",\"healthy\":true}","{\n  \"service\": \"ledger\",\n  \"healthy\": true\n}",[84,85],"Formatting does not validate the meaning of application-specific fields.","Input and output stay in this tab and are cleared when the workspace is left or reset.",[87,90,93,96,99],{"question":88,"answer":89},"What is JSON formatting?","JSON formatting adds consistent indentation and line breaks to compact JSON so the structure is easier to read. It does not change the data — only the whitespace.",{"question":91,"answer":92},"Is my JSON data uploaded to a server?","No. StackCache formats JSON entirely in your browser. The input never leaves your device and is cleared when you navigate away.",{"question":94,"answer":95},"What is the maximum JSON size this tool handles?","The formatter processes JSON limited by your browser's available memory. Most browsers handle tens of megabytes comfortably, but very large files may cause a brief pause.",{"question":97,"answer":98},"How do I validate JSON syntax?","Paste your JSON and run the formatter. If the input contains a syntax error, the tool reports the exact line and column of the first problem.",{"question":100,"answer":101},"What is the difference between JSON and JSON5?","JSON5 extends JSON with JavaScript-like features: single-quoted strings, unquoted keys, trailing commas, comments, and additional number formats. Standard JSON parsers reject JSON5 input.",1788868140180]