JSON Formatter & Validator
Beautify, validate, minify and repair JSON. Pinpoints errors by line and column, fixes common mistakes in one click and never rounds your big numbers.
Input
Common JSON Errors and How to Fix Them
| Error | Invalid | Valid |
|---|---|---|
| Trailing comma | {"a": 1, "b": 2,} |
{"a": 1, "b": 2} |
| Single quotes | {'name': 'Ana'} |
{"name": "Ana"} |
| Unquoted property name | {name: "Ana"} |
{"name": "Ana"} |
| Comments | {"a": 1 // id} |
{"a": 1} |
| Missing comma | ["a" "b"] |
["a", "b"] |
| Python or JavaScript literals | {"ok": True, "x": None} |
{"ok": true, "x": null} |
| Leading zero in number | {"zip": 01234} |
{"zip": "01234"} |
| Raw line break in string | {"t": "line 1↵line 2"} |
{"t": "line 1\nline 2"} |
All of these except the leading zero are repaired automatically by Fix JSON. A leading zero usually means the value is an identifier (ZIP code, phone, SKU) that should be a string, so the tool asks you to decide.
What is JSON?
JSON (JavaScript Object Notation) is a lightweight text format for structured data, defined by RFC 8259. It is the default format of web APIs, configuration files, NoSQL databases, analytics exports and structured data for SEO (JSON-LD).
A JSON document is built from six value types: objects (key/value pairs in curly braces), arrays (ordered lists in square brackets), strings in double quotes, numbers, the booleans true and false, and null. The syntax is deliberately strict — no comments, no trailing commas, no single quotes — which is why a formatter with a precise validator saves time.
Exact error location
Errors are reported with line, column and a code snippet, in plain language instead of cryptic parser messages.
One-click repair
Fix JSON turns JavaScript objects, Python dicts and hand-edited configs into strict, valid JSON.
Big-number safe
Long integer IDs keep every digit, unlike tools built on JSON.parse that round them.
Tree view with paths
Explore large documents node by node and copy the JSON path of any value.
Sort keys
Sort object keys alphabetically to compare two JSON files or keep diffs clean.
Private by design
Everything runs in your browser. Nothing is uploaded or stored.
Frequently Asked Questions
Was this tool helpful?
Thanks for your feedback!
Could not send your feedback. Please try again.