Output will appear here...
JSON is the universal data interchange format — used in REST APIs, configuration files, NoSQL databases, and frontend frameworks. This formatter validates, pretty-prints, and minifies JSON in your browser. It catches syntax errors precisely (indicating the exact line and column), handles Unicode correctly, and can sort keys alphabetically for easier comparison and diffing.
The most frequent JSON syntax errors: trailing commas after the last element in an array or object (valid in JavaScript, forbidden in JSON); unquoted property names ({name: "value"} is invalid JSON, {"name": "value"} is correct); single quotes instead of double quotes; comments (JSON has no comment syntax); and undefined or NaN values (JSON only supports null, not undefined/NaN). The validator pinpoints the first error and its location.
Douglas Crockford (JSON's creator) deliberately excluded comments. He later explained that he removed them because people were using comments to include parsing directives — defeating the goal of a simple, universal data format. JSONC (JSON with Comments) is a non-standard extension used by VS Code and TypeScript configs.
JSON is a strict subset of JavaScript literal syntax with additional restrictions: keys must be double-quoted strings, undefined and functions are not valid values, trailing commas are forbidden, and NaN/Infinity are not supported. Valid JSON is valid JavaScript, but not vice versa.
String (double-quoted), Number (integer or floating-point, no hex/octal), Boolean (true/false), null, Array ([...]), and Object ({...}). Dates, undefined, functions, and regular expressions are not JSON types.
The browser's JavaScript engine handles JSON up to the available memory — typically tens to hundreds of MB. For very large files (>100 MB), processing may slow. For multi-GB JSON, use a streaming parser like jq or Python's ijson at the command line.
See also JSON to CSV, JSON to YAML, XML to JSON, and the full data format toolkit.
📖 Reference: RFC 8259 — The JavaScript Object Notation (JSON) Data Interchange Format