Skip to main content
Premier SEO Services

Developer tools

JSON Viewer

Validate, pretty-print or minify JSON and explore it as a collapsible, searchable tree. If the JSON is invalid, you see the line, the column and a plain-English reason.

  • Runs in your browser
  • Free, no sign-up
  • Unlimited use
  • Updated 30 September 2026

JSON Viewer

Paste your text — the result updates as you type

  • Inputs over 1 million characters are processed when you press Format and validate, not as you type.
  • Standard JSON only: comments, trailing commas and single quotes are reported as errors.

How to use the JSON viewer

  1. 1Paste JSON into the JSON box, press Open file to load a .json file, or press Example.
  2. 2Read the result: valid JSON shows Valid JSON with counts of objects, arrays and values; invalid JSON shows the line and column with a caret under the problem. Press Go to error to jump there.
  3. 3Switch View between Formatted, Tree and Minified, and set Indent and Sort keys.
  4. 4In Tree view, type in Search keys and values to list every matching path, or use Expand all and Collapse all.
  5. 5Press Copy or Download to save data.json or data.min.json.

Example

Input
{"name":"Ada Lovelace","born":1815,"languages":["English","French"],"id":12345678901234567890}
Output
{
  "name": "Ada Lovelace",
  "born": 1815,
  "languages": [
    "English",
    "French"
  ],
  "id": 12345678901234567890
}

The large id is written back exactly. Tools that round-trip through JavaScript numbers would print 12345678901234567000.

Validating JSON and reading errors

The viewer checks your input against the JSON standard (RFC 8259) and stops at the first problem, showing the line, the column and the line itself with a caret. For {"name": "Ada", "born": 1815,} it reports line 1, column 29: Trailing comma before }.

The most common causes, each with its own message:

ErrorFix
Trailing comma after the last itemDelete the comma before } or ]
Single quotes 'name'Use double quotes
Unquoted key {name: 1}Quote it: {"name": 1}
True, None, NaN, undefinedUse true, null or a string
Comment // …Remove it (JSON has no comments)
Line break inside a stringWrite it as \n

Duplicate keys are valid syntax, but most parsers keep only the last value, so the viewer warns you about them.

Pretty-print and minify

Formatted indents with 2 spaces, 4 spaces or tabs, one value per line. Minified removes every optional space and line break, the form used in API responses and config strings. Sort keys orders object keys A → Z or Z → A, which makes two versions of a document easy to compare.

Values are copied exactly as written: 1.50 stays 1.50, \u00e9 stays an escape, and integers larger than JavaScript can hold (above 9,007,199,254,740,991) aren't rounded. Many online formatters silently change such IDs.

Tree shows objects and arrays as collapsible branches, each labelled with its size ({6 keys}, [2 items]). The first two levels open automatically. Hover a node to see its path, such as $.address.city or $.items[3].price.

Search keys and values finds every key or value that contains your text, case-insensitively, and lists the matching paths. That is the quickest way to find where a field lives in a large API response. Arrays with more than 200 items show the first 200, with a button to load more.

Large files

Everything runs in your browser, so the limit is your device's memory rather than an upload cap. Inputs up to 1 million characters are validated as you type (with a short delay); larger ones wait until you press Format and validate, so typing never freezes. Files of tens of megabytes work on a desktop browser. The formatted view shows the first 3 million characters; Copy and Download always include everything.

JSON vs JSON5 and comments

JSON5 and JSONC ("JSON with comments", used by VS Code and tsconfig.json) add comments, trailing commas, single quotes and unquoted keys. They are convenient for config files people edit, but they aren't JSON, and JSON.parse rejects them. This viewer follows the standard, so it reports those features as errors. That is deliberate: if an API or a library expects JSON, this is exactly what it would reject.

Is my text private?

This tool runs entirely in your browser. Your text is not uploaded to our servers.

Sources

Questions about the JSON viewer

Why is my JSON invalid?

Usually a trailing comma, single quotes, an unquoted key, a comment, or Python-style True/None. The error box names the problem and points to the exact character.

Can I load a JSON file?

Yes. Press Open file and choose a .json, .geojson or .jsonld file. It is read in your browser, not uploaded.

Is my data sent anywhere?

No. Parsing, formatting and searching all happen on your device. Your input is kept in this browser tab's session storage so a reload doesn't lose it, and is cleared when you close the tab.

Last updated 30 September 2026Maintained by Premier SEO Services

Report a problem