Paste JSON, explore it as a tree or table, with structure stats and precise error positions
| Error You See | You Probably Wrote | Fix |
|---|---|---|
Unexpected token } / ] | ["a", "b",] | Remove the trailing comma — JSON (RFC 8259) doesn't allow one before a closing bracket |
Unexpected token ' | {'key': 1} | Strings and keys use double quotes only: {"key": 1} |
| Unexpected identifier | {key: 1} | Quote the key: {"key": 1} (that's JSON5/JS object syntax, not JSON) |
Unexpected token / | // note or /* note */ | JSON has no comments — move notes to a "_comment" field or strip them |
Unexpected token N | NaN / undefined / Infinity | Not valid JSON numbers — serialize as null or a string like "NaN" |
| Unexpected number | 01 or +5 | Leading zeros and plus signs aren't allowed — 1, 5, -5, 0.5, 1e3 are |
| Bad control character | literal Tab/newline inside a string | Escape as \t / \n; unescaped control characters are invalid in strings |
Unexpected token  | UTF-8 BOM before { | Save the file without a BOM, or the viewer strips it for you when opening files |
The viewer parses your text with the browser's native JSON parser (strict RFC 8259 — the same rules every conformant API speaks), then hands the resulting structure to jsoneditor, an Apache-2.0 library that renders each object and array as collapsible nodes. Tree mode shows the full hierarchy with per-node actions (insert, duplicate, remove, drag); table mode flattens arrays of similar objects into a spreadsheet-style grid — the shape API results and product feeds come in; text mode is the raw document with live validation.
Every parse also computes structural stats: total values, keys, objects, arrays, strings, numbers, booleans, nulls, maximum nesting depth, and byte size minified vs. pretty-printed with 2-space indentation. These numbers answer practical questions — is this payload bloated with nesting? Is it worth minifying for transport? — at a glance.
The "Load sample" button inserts a small order-tracking document. Run the numbers on it: the JSON contains a customer object, an items array of two products, and a shipping object with a nested address — 22 keys in total, 25 values including the root, maximum depth 4 (root → shipping → address → values). Serialized compactly it's 345 bytes; pretty-printed at 2 spaces it grows to 520 bytes, about 51% more — the classic transport-vs-debugging trade-off. The arithmetic inside checks out too: one keyboard at $89.99, two cables at $9.50, plus $12.75 express shipping totals $121.74, which is exactly what the total field carries.
JSON is deliberately rigid: double quotes, no trailing commas, no comments, no NaN. The rigidity is why a JSON parser in any language can read any other's output. Viewers that quietly accept sloppy JSON are hiding an interoperability bug — the API you're testing will reject it even if the viewer doesn't. This viewer parses the way your production parser does and tells you exactly where it disagreed.
Paste the JSON into the box and click View — it renders as an expandable tree you can collapse and drill into, with a table mode for arrays of similar objects and a text mode for the raw document. You can also open a .json file directly from disk. Nothing is uploaded; the parsing and rendering happen locally, so API responses with tokens or personal data stay on your machine.
The five classics: a trailing comma before a closing bracket, single quotes instead of double, unquoted keys, // or /* */ comments (JSON has none), and NaN/undefined (not valid JSON numbers — use null). The viewer reports the exact character position of the parse failure so you can jump to the offending spot instead of diffing by eye.
A formatter rewrites the text — consistent indentation, one property per line — for reading raw. A viewer parses the document into an interactive tree: collapsible branches, navigation, search over large arrays, per-node editing, and structure stats (node counts, depth). They compose: format for diffing and reading, view for exploring. This site has both, cross-linked.
No — it parses strict JSON per RFC 8259. JSON Lines (one JSON value per line) and JSON5 (unquoted keys, comments, trailing commas) require a different parser; most tools that claim to 'view' them silently coerce them first. Convert to standard JSON, or split NDJSON into separate documents, then view.
The practical limit is browser memory and DOM size rather than a hard cap — files of a few megabytes view comfortably, and multi-hundred-MB files will be slow in tree mode because every node is interactive. The stats bar shows node count and nesting depth so you can see why; for huge documents, text mode is lighter than tree mode.
Yes. Tree mode edits values, keys, and structure with insert/duplicate/remove actions on every node; text mode edits raw JSON with live validation. The download buttons export the current state pretty-printed (2 spaces) or minified, and Copy puts it on your clipboard.