JSON viewer.
Paste JSON, get it formatted, validated and explorable. Client-side only — your data never leaves this tab.
Paste JSON, get it formatted, validated and explorable. Client-side only — your data never leaves this tab.
Every control below maps to a button already on this page. Validation runs automatically as you type.
The rules below come from the standards themselves: RFC 8259, ECMA-404, json.org, and the MDN JSON.parse reference this page's parser follows. Verified Sep 2026.
| Feature | Rule | What breaks |
|---|---|---|
| Root value | Any value: object, array, string, number, true, false or null. | Nothing — a bare 42 or "hi" is valid JSON and this page accepts it. |
| Strings | Double quotes only, with backslash escapes. | Single-quoted strings fail; fix by re-quoting. |
| Comments | Not part of the format at all. | Config-style // and /* */ comments fail; strip them first (see JSONC in the FAQ). |
| Trailing commas | Forbidden in objects and arrays. | {"a":1,} fails; delete the last comma. |
| Numbers | Decimal only: no leading plus, no leading zeros, no NaN or Infinity. | 01, +1, NaN and Infinity all fail; quote them as strings or remove them. |
| Duplicate keys | Parsers keep going; the last value wins silently. | No error is shown — check the producer if a value looks wrong. |
| Nesting depth | The spec sets no limit; implementations recurse. | Extreme depth slows browsers; this page reports Max depth so you can see it. |
Paste any left-hand sample into the box to see it pass, and any right-hand sample to see the error box fire.
| Valid — parses clean | Invalid — same idea, broken |
|---|---|
| {"a": 1} | {'a': 1} — single quotes are not strings in JSON. |
| {"a": 1, "b": 2} | {"a": 1, "b": 2,} — trailing comma after the last pair. |
| [1, 2, 3] | [1, 2, 3,] — trailing comma after the last item. |
| "just a string" | 'just a string' — quoting rule applies to root values too. |
| {"n": 42, "ok": true, "x": null} | {"n": 01, "ok": True, "x": undefined} — no leading zeros, lowercase literals only, no undefined. |
| {"a": 1} | {"a": 1} // total — comments are never valid, even after valid JSON. |
What the red box says, and what to do about it.
| Error message | Meaning | Fix |
|---|---|---|
| Unexpected token … at position N | The parser choked at one character; the box shows surrounding text with a marker. | Look at the marker: usually a missing comma, a missing quote, or a trailing comma one line up. |
| Unexpected end of JSON input | The text stops mid-value — truncated paste or unclosed bracket. | Re-copy the full payload; count your opening and closing braces. |
| Unexpected non-whitespace character after JSON | Two documents pasted together, or trailing garbage after valid JSON. | Keep one document per paste; move the second into a fresh pass. |
Format and Minify hold identical data — only whitespace differs, so switching never changes values, keys or order. The status line reports the input's byte size; the Size card reports the pretty-printed byte size, which is larger because of indentation. Both count UTF-8 bytes, not characters, so text with emoji or non-Latin scripts shows more bytes than characters. That byte honesty is what makes the readout useful before pasting into size-capped fields.
The vocabulary the error messages and readouts assume you know.
| Term | Meaning |
|---|---|
| Value | Anything JSON can hold: object, array, string, number, true, false or null. |
| Object | Curly-brace collection of quoted key and value pairs: {"a": 1}. |
| Array | Square-bracket ordered list of values: [1, "two", false]. |
| Literal | The three bare keywords true, false and null — always lowercase. |
| Escape sequence | Backslash combos inside strings: \" \\ \n \t and \u00e9 style unicode escapes. |
| Whitespace | Spaces, tabs and newlines between tokens — insignificant, which is why minifying is safe. |
| Depth | How many values deep the nesting goes; this page's Max depth card reports it. |
| Root type | The kind of the top-level value; this page's Root type card names it after every parse. |
First, minify before embedding JSON in URLs, HTML attributes or QR codes, and format before reading or diffing — the buttons make switching free. Second, glance at Max depth on unfamiliar payloads: depth past five or six means the tree view will serve you better than scrolling raw text. Third, when an API rejects a payload this page calls valid, the problem is shape, not syntax — a missing required field or a string where a number belongs — so take the formatted output to a schema validator next. Copy is worth a mention too: it grabs exactly what sits in the box at that moment, formatted or minified, so normalize first and then copy rather than the other way round.
Each answer describes this tool's real behavior or cites an official source. Nothing is invented.
No hard limit is coded into the page. Parsing runs in your browser's own memory, so typical API payloads validate instantly while multi-megabyte dumps may pause the tab briefly while the parser works. If a paste feels stuck, try a smaller chunk. Nothing is uploaded regardless of size.
No. Paste, Format, Minify, Tree view, Copy and Download all run locally in your tab. Download builds the file from a Blob in your own browser, and closing the tab discards everything. There is no account, no server round-trip and no logging.
JSON is the single-document data format defined by RFC 8259. JSONL is newline-delimited JSON, one complete value per line, used for logs and streams; paste any single line here to inspect it. JSONC is JSON with comments, common in editor config files; comments are not valid JSON, so strip them before pasting.
Because the specification forbids them. ECMA-404 and RFC 8259 allow double-quoted strings only, with no comments and no trailing commas. This page's error box quotes the parser message and shows the surrounding text with a marker at the failure point, so check commas, quotes and trailing commas right there. Verified Sep 2026.
No. This page answers whether input is valid JSON, meaning correct syntax, not whether it matches your API contract, meaning correct shape. For shape checks, run the payload through a JSON Schema validator against your schema draft; use this page first to confirm the syntax is clean.
The built-in parser keeps the last value with no error, so one object with the same key twice parses as if only the second occurrence existed, and the tree view shows the surviving value. The specification calls duplicate names unpredictable, so if duplicates surprise you, fix the producer rather than the payload.
Behavior above was read directly from this page's script and re-verified Sep 2026: validation via the browser's built-in JSON parser on every keystroke; Format as two-space pretty-print and Minify as compact output, both refusing invalid input; tree rendering with collapsible nodes; readouts for top-level keys, recursive max depth, pretty byte size and root type; error box pairing the parser message with a text marker at the failure position. Spec claims follow RFC 8259, ECMA-404, json.org and MDN's JSON.parse documentation linked in § 03.
This page checks syntax only, never schema conformance; JSONL multi-line streams and JSONC comments must be reduced to plain JSON first; extremely large or deeply nested pastes can pause the tab since parsing is synchronous; and the tree view reflects the last successful parse, so re-open it after editing. Everything is 100% client-side: no account, no network calls, no logging — pasted data never leaves the tab.
More free client-side utilities from the same lab.