JSON Formatter & Validator
Paste your JSON to instantly format, validate, beautify, or minify it. All processing happens locally in your browser.
Paste JSON, upload a file, or load sample
JSON debugging guides
Complete Guide to JSON
What is JSON?
JSON (JavaScript Object Notation) is a lightweight data-interchange format that is easy for humans to read and write, and easy for machines to parse and generate. It is the dominant format for APIs, configuration files, and data storage in modern web development. JSON was derived from JavaScript but is language-independent and supported by virtually all programming languages.
JSON Syntax Rules
Data Types
String (double-quoted), Number, Boolean (true/false), null, Object {}, Array [].
Keys Must Be Strings
All keys must be double-quoted strings. Single quotes and unquoted keys are invalid.
No Trailing Commas
Unlike JavaScript, JSON does NOT allow trailing commas after the last item.
No Comments
JSON does not support comments (// or /* */). Use JSONC or JSON5 for comments.
Common JSON Errors
- Single quotes:
{'name': 'John'}is invalid. Use double quotes:{"name": "John"} - Trailing commas:
{"a": 1, "b": 2,}— remove the trailing comma after the last item - Unquoted keys:
{name: "John"}— all keys must be in double quotes - Missing commas: Between properties or array items
- Unexpected top-level shape: Current JSON allows any JSON value, but a particular API may still require an object or array
JSON vs. XML
JSON has largely replaced XML for web APIs because it is more compact, easier to parse, and maps directly to programming language data structures. XML is still used in some enterprise systems (SOAP, RSS, SVG) and when document markup with attributes is needed.
Frequently Asked Questions
What is the maximum size of a JSON file?
JSON itself has no universal file-size limit. The practical limit depends on browser memory, the device, and the parser. For very large datasets, use a streaming parser or a controlled local workflow.
Is data sent to your server?
No. All JSON processing happens entirely in your browser using JavaScript. No data is ever transmitted to our servers.
What is the MIME type for JSON?
The official MIME type is application/json. When setting Content-Type headers in APIs, use: Content-Type: application/json; charset=utf-8.
