JSON formatter and validator
Pretty-print, minify, and validate JSON in the browser with instant error feedback.
JSON formatting and validation
JSON is the default format for APIs, configuration files, and frontend state snapshots. A formatter makes payloads easier to inspect, while validation catches syntax issues before they break an integration.
Pretty mode
Expand compact JSON into a readable structure with indentation so you can scan nested objects and arrays quickly.
Minify mode
Strip whitespace and line breaks to produce a smaller payload that is easier to ship or embed.
Common JSON errors
| Error type | What usually causes it | Example |
|---|---|---|
| Unexpected token | Trailing commas, single quotes, or malformed characters often trigger this error. | { "key": "value", } |
| Unexpected end of input | An object or array was never closed properly. | { "data": [1, 2 |
| Unquoted key | JSON requires double quotes around every property name. | { key: "value" } |
Frequently asked questions
Does standard JSON allow comments?
No. RFC 8259 JSON does not support comments. If you need inline notes, use another format such as YAML or JSON5, or add a dedicated field like _comment.
Can I use single quotes in JSON?
No. JSON requires double quotes around both property names and string values. Single quotes are allowed in JavaScript object literals, but not in strict JSON.