Skip to main content
AI JSONMedic

JSON Viewer Online

A JSON viewer turns raw JSON text into something readable. Paste JSON or open a .json file below, and the viewer shows it as a collapsible tree or as indented text. JSON is plain text defined by RFC 8259, so any text editor can open it too. If the text is invalid, the viewer shows the error and can repair it.

Runs in your browser · nothing is uploaded
JSON input

How to view JSON online

Paste the JSON into the box, or load it from your computer. The tree appears as soon as the text parses.

  1. Add the JSON. Paste it into the input box, click Open file, or drag a .json file onto the box. Sample loads a small example.
  2. Pick a view. Tree shows each key and value on its own row with its type. Text shows the same data indented with two spaces, with a Copy button.
  3. Open and close nodes. Click an object or array row to fold it. Expand all and Collapse all work on the whole document. The first two levels start open.
  4. Copy what you need. Hover a row and click copy path for its JSONPath (for example $.logins[0].ip) or copy value. A string is copied without its quotes; an object or array is copied as indented JSON.

Opening a file from disk has its own page, the JSON file viewer, which explains file types, encodings and what to do when a file will not open.

How to view a JSON file without a tool

Open it in any text editor. JSON is a text format, and RFC 8259 requires JSON exchanged between systems to be encoded as UTF-8, so Notepad, TextEdit, VS Code or any other editor shows the characters. What an editor does not do is indent a file that was saved on one line, or fold nested objects.

Browsers differ. Firefox (tested on version 158) opens a local .json file in its built-in JSON viewer, with a collapsible tree and a Raw Data tab. Chrome (tested on version 155) shows the raw text with a Pretty-print checkbox that indents it. Either way, you can paste the text here to get the tree and the error check.

What the tree view shows

Every row is one JSON value with its type next to it. RFC 8259 has four primitive types (string, number, boolean, null) and two structured types (object, array). The viewer labels them like this:

  • object · N keys — curly braces, named members. Keys show in blue.
  • array · N items — square brackets, members in order. Rows show their index (0, 1, 2…).
  • string — text in double quotes, shown in green.
  • number — shown in orange.
  • boolean — true or false.
  • null — the empty value.

Two things come from the browser's JSON parser and are worth knowing. If an object repeats a key, only the last value is shown ({"a":1,"a":2} shows a: 2); RFC 8259 says names should be unique and leaves the rest to the parser. Large integers lose precision: 12345678901234567890 is shown as 12345678901234567000, because the parser stores numbers as 64-bit floating point, and RFC 8259 notes that only integers up to 253−1 are exchanged reliably.

Arrays and objects with more than 200 members show the first 200, with a button for the next 200, so a long list stays quick to scroll.

Why JSON will not display: common errors

If the text is not valid JSON, there is no tree to show. The viewer reports the first error with its line and column, prints the line with a caret under the spot, and offers Repair and view, which runs the site's repair engine in your browser and shows the repaired JSON. These are the messages it gives for the usual causes:

ProblemInvalid JSONReported errorRepair result
Trailing comma{ "a": 1, "b": 2, }Line 4, column 1: Trailing comma — remove the comma before the closing }.{"a":1,"b":2}
Single quotes{ 'a': 1 }Line 2, column 3: Property names must use double quotes ("), not single quotes.{"a":1}
Unquoted key{ a: 1 }Line 2, column 3: Property names must be wrapped in double quotes.{"a":1}
Comment{ // note "a": 1 }Line 2, column 3: Comments are not allowed in JSON — remove them.{"a":1}
Cut off (truncated){ "a": [1, 2Line 2, column 13: The array opened at line 2, column 8 is never closed — missing ].{"a":[1,2]}

Check a repaired result before you use it: the engine guesses when the input is ambiguous. The JSON repair tool lists every change it made, and the validator checks syntax only. Parser messages by language are collected under JSON errors.

Viewer, formatter, validator: which to use

  • Viewer (this page) — read and explore the structure, copy values and paths.
  • Formatter — rewrite the text with 2 or 4 spaces, optionally with keys sorted A–Z. Minify does the opposite.
  • Validator — a yes/no syntax check with the error position.
  • JSONPath tester — pull out values with an expression such as $..name.
  • JSON Studio — all of these in one two-pane workspace, plus diff and the converters.

New to the format? Learn JSON starts with what JSON is and the syntax rules.

Privacy and limits

The viewer runs in your browser. Pasted text and opened files are parsed by the page's own script with the browser's built-in JSON.parse; the viewer makes no network request with your JSON. The repair step also runs in the browser.

Files up to 50 MB open; larger ones are refused with a message. In desktop Chrome a 1.7 MB file showed as a tree in about half a second, a 17 MB file in about 1.2 seconds and a 42 MB file in about 2 seconds. Text over 1 MB is kept out of the input box, and the Text view draws the first 1 MB of indented text (Copy still copies all of it). Phones and older computers are slower.

Frequently asked questions

Paste the text into the viewer on this page or click Open file. JSON is plain text (RFC 8259), so a text editor also works; the viewer adds a collapsible tree and indentation.

Any text editor can open it, because JSON is text. A web browser can too: Firefox shows its own JSON viewer, Chrome shows the text with a Pretty-print option. A JSON viewer is easier to read when the data is nested.

View it as a tree, or switch to Text to see it indented with two spaces. Whitespace between tokens does not change the meaning of JSON under RFC 8259, so indenting it is safe.

Paste the contents into this viewer, or open the local file with the Open file button or by dropping it on the input box. The file is read by your browser and not uploaded.

The text is not valid JSON. Common causes are a trailing comma, single quotes, unquoted keys, comments or a file that was cut off. RFC 8259 allows none of these. The viewer shows the line and column of the first error and can repair it.

Not exactly. A formatter rewrites the text with indentation. A viewer lets you read the structure, for example as a collapsible tree, and copy a single value or its path.

The JSON Medic newsletter

One JSON error and its fix, weekly, plus new guides and tools. Free.

We send a confirmation link first. Unsubscribe with one click in any mail. See the privacy policy.

Related JSON tools