EXP-005 · Tool · No signup

JSON viewer.

Paste JSON, get it formatted, validated and explorable. Client-side only — your data never leaves this tab.

§ 01

Format & explore

005 / JSON Viewer
Waiting for input…
—
Top-level keys
—
Max depth
—
Size
—
Root type
§ 02

How to use it

Guide · five moves

From pasted text to answers

Every control below maps to a button already on this page. Validation runs automatically as you type.

  1. Paste your payload. Drop API responses, config files or log lines into the text box. The page parses on every keystroke (debounced), so there is no run button. Sample loads a small demo document showing objects, arrays and nesting; Clear wipes the box and parks every readout back at its waiting state.
  2. Format or Minify. Format rewrites the box with two-space indentation for reading and diffing; Minify compacts it to one line for pasting into URLs, embeds or size-sensitive fields. Both refuse to run on invalid input rather than guessing — fix the error first.
  3. Read the status line. A green dot plus byte count means valid; a red dot means invalid, with the parser's exact message in the error box and the surrounding text shown around a marker at the failure point. The hint under the message names the usual suspects: commas, quotes and trailing commas near the marker.
  4. Scan the four readouts. Top-level keys counts object keys (or array items); Max depth reports nesting depth; Size shows the pretty-printed byte count; Root type names the top-level value — object, array, string, number, boolean or null. All four reset when the box is empty.
  5. Explore, copy, or download. Tree view renders collapsible nested details so you can fold deep structures and click through them; the button toggles to Hide tree. Copy puts the current box text on the clipboard; Download saves it as data.json straight from your browser.
  6. Work through this checklist on red. Read the marker position first, then check the character just before it: a missing comma between pairs, an unclosed quote swallowing the rest, a trailing comma after the last item, or a comment pasted from a config file. Fix one, watch the dot flip green, and repeat — most broken payloads need only one or two such passes.
§ 03

JSON reference

Spec facts · RFC 8259

What counts as valid JSON

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.

FeatureRuleWhat breaks
Root valueAny value: object, array, string, number, true, false or null.Nothing — a bare 42 or "hi" is valid JSON and this page accepts it.
StringsDouble quotes only, with backslash escapes.Single-quoted strings fail; fix by re-quoting.
CommentsNot part of the format at all.Config-style // and /* */ comments fail; strip them first (see JSONC in the FAQ).
Trailing commasForbidden in objects and arrays.{"a":1,} fails; delete the last comma.
NumbersDecimal 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 keysParsers keep going; the last value wins silently.No error is shown — check the producer if a value looks wrong.
Nesting depthThe spec sets no limit; implementations recurse.Extreme depth slows browsers; this page reports Max depth so you can see it.

Valid versus invalid at a glance

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 cleanInvalid — 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.

Error box to fix, mapped

What the red box says, and what to do about it.

Error messageMeaningFix
Unexpected token … at position NThe 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 inputThe 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 JSONTwo documents pasted together, or trailing garbage after valid JSON.Keep one document per paste; move the second into a fresh pass.

Minify versus pretty, and the byte readout

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.

Terms in one line each

The vocabulary the error messages and readouts assume you know.

TermMeaning
ValueAnything JSON can hold: object, array, string, number, true, false or null.
ObjectCurly-brace collection of quoted key and value pairs: {"a": 1}.
ArraySquare-bracket ordered list of values: [1, "two", false].
LiteralThe three bare keywords true, false and null — always lowercase.
Escape sequenceBackslash combos inside strings: \" \\ \n \t and \u00e9 style unicode escapes.
WhitespaceSpaces, tabs and newlines between tokens — insignificant, which is why minifying is safe.
DepthHow many values deep the nesting goes; this page's Max depth card reports it.
Root typeThe kind of the top-level value; this page's Root type card names it after every parse.

Three habits for cleaner payloads

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.

§ 04

JSON FAQ

Six honest answers

Questions this page can answer precisely

Each answer describes this tool's real behavior or cites an official source. Nothing is invented.

Is there a size limit on what I can paste?

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.

Is my JSON uploaded anywhere?

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.

What is the difference between JSON, JSONL and JSONC?

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.

Why do trailing commas and single quotes fail?

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.

Can I validate against a schema on this page?

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.

What happens with duplicate keys?

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.

§ 05

Method, limits

Verified Sep 2026

How this page was checked

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.

Known limits

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.

Related tools

More free client-side utilities from the same lab.

Retired toolbox →Character Counter →UTM Builder →Field Notes →