JSON Viewer
An online JSON tree viewer: paste JSON, open a file or load a URL, then explore it as a collapsible tree, a table or formatted text. Search, copy any path, and keep your data private in your browser.
Selected node
- Name
- root
- Type
- object · 4 keys
{
"user": {
"id": 42,
"name": "Asha Patel",
"email": "asha@example.com",
"verified": true,
"avatar": "https://www.wasimshaikh.com/favicon.svg",
"address": {
"street": "12 Ashram Road",
"city": "Ahmedabad",
"country": "IN",
"postcode": "380009"
}
},
"orders": [
{
"id": 1042,
"status": "shipped",
"total": 59.9,
"currency": "USD",
"createdAt": "2026-09-28T10:15:00Z",
"items": [
{
"sku": "TS-RED-M",
"name": "T-shirt",
"qty": 2,
"price": 19.95
},
{
"sku": "MUG-01",
"name": "Mug",
"qty": 1,
"price": 20
}
]
},
{
"id": 1043,
"status": "processing",
"total": 120,
"currency": "USD",
"createdAt": "2026-10-02T08:40:00Z",
"items": [
{
"sku": "BAG-TOTE",
"name": "Tote bag",
"qty": 3,
"price": 40
}
]
}
],
"preferences": {
"theme": "dark",
"accent": "#2563eb",
"newsletter": false,
"language": null
},
"lastLogin": 1760000000
}$What Is a JSON Viewer?
JSON (JavaScript Object Notation, defined in RFC 8259 and ECMA-404) is the text format most APIs, config files and logs use. It is easy for programs to read but hard for people once it is minified onto one line or nested ten levels deep. A JSON viewer parses the text and shows it as a tree you can fold and unfold, so you can see the shape of the data, find the field you need and copy exactly that value or its path.
Use a viewer when you want to understand a document, such as an API response, a webhook payload or a package-lock file. Use a JSON formatter when you only need the text re-indented.
How to View JSON Online
- Add your JSON: paste it into the input box, drop a
.jsonfile onto the viewer, use Open file, or use Load URL for a public API. - Explore the tree: click the arrows or use the arrow keys to expand nodes, or expand everything to level 1, 2 or 3.
- Select a node to see its name, type, full value and readable dates for timestamps.
- Copy what you need: the value, or its path as JSONPath, JavaScript or jq.
Tree, Text and Table Views
| View | Best for | What you get |
|---|---|---|
| Tree | Exploring nested data, finding a field, copying its path | Collapsible nodes with type colours and child counts; select a node to see its details |
| Text | Editing, formatting, minifying and fixing errors | Line numbers, Format, Remove white space, Sort keys, and a jump to the exact error |
| Table | Comparing records in an array, such as API results | One row per item, one column per key, click a column header to sort |
Open a JSON File
On Windows or a Mac, drag the file from Explorer or Finder onto the viewer, or click Open file. On a phone, tap Open file and pick the file from Files or Downloads. The viewer reads .json, .geojson, source maps (.map) and plain-text files that contain JSON. Everything is read locally; the file is never uploaded. Files of a few megabytes open instantly, and files up to about 50 MB work on a laptop.
JSON Data Types
| Type | Example | Rules |
|---|---|---|
| string | "Ahmedabad" | Text in double quotes. Single quotes are not allowed. |
| number | 59.9 | Integer or decimal, optional exponent (1e6). No leading zeros, NaN or Infinity. |
| boolean | true | Lowercase true or false only. |
| null | null | An empty value. Lowercase. |
| object | {"id": 42} | Unordered key/value pairs. Keys must be double-quoted strings. The tree shows {n} keys. |
| array | [1, 2, 3] | An ordered list of any values. The tree shows [n] items. |
The colours match the tree view, so you can tell a string "42" from the number 42 at a glance.
JSON Paths Explained
A path says how to reach one value from the top of the document. Select any node and the viewer shows its path in three syntaxes, ready to copy. The same value, written three ways:
| Syntax | Path | Use it in |
|---|---|---|
| JSONPath | $.orders[0].items[1]['unit price'] | API testing tools, Postman, JSONPath libraries (RFC 9535) |
| JavaScript | data.orders[0].items[1]["unit price"] | Pasting straight into JavaScript or TypeScript code |
| jq | .orders[0].items[1]["unit price"] | The jq command-line JSON processor |
Keys that are not plain identifiers (with spaces, dashes or dots) switch to bracket notation automatically, and array items use their zero-based index.
Common JSON Errors and How to Fix Them
When the input is invalid, the viewer shows the line and column of the first problem in plain English, keeps the last valid tree on screen, and can jump to the error or repair it for you.
| Error | Invalid | Fix |
|---|---|---|
| Trailing comma | {"a": 1,} | Remove the comma after the last item: {"a": 1} |
| Single quotes | {'a': 'x'} | Use double quotes for keys and strings: {"a": "x"} |
| Unquoted keys | {a: 1} | Wrap property names in double quotes: {"a": 1} |
| Comments | {"a": 1 // note} | Delete the comment. JSON has no comment syntax. |
| NaN, Infinity, undefined | {"a": NaN} | Use null or a real number: {"a": null} |
| Python literals | [True, None] | Use lowercase JSON literals: [true, null] |
| Two values in one file | {"a":1} {"b":2} | Wrap them in an array, or treat the file as JSON Lines (one value per line) |
Got a file with many of these? Fix JSON repairs them all at once.
Keyboard Shortcuts
| Keys | Action |
|---|---|
| ↑ ↓ | Move between nodes in the tree |
| → / ← | Expand a node or move to its first child / collapse it or move to its parent |
| Enter or Space | Expand or collapse the selected node |
| Home / End, Page Up / Page Down | Jump to the first or last node, or one screen at a time |
| Ctrl/⌘ + C | Copy the selected node’s value (when the tree has focus) |
| Ctrl/⌘ + F | Search keys and values; Enter and Shift+Enter step through matches |
| Double-click | Copy a node’s value |
| Esc | Leave full screen, or clear the search box |
Frequently Asked Questions
- Is my JSON uploaded anywhere?
- No. Parsing, searching and formatting all run in your browser, and there is no server-side storage. If “Remember on this device” is ticked, your last input is kept in your browser’s local storage so it is there when you come back; untick it to clear it.
- How large a JSON file can it open?
- Files of several megabytes open almost instantly, and files up to about 50 MB work on a modern laptop because the tree only draws the rows on screen. Above 50 MB you are asked before the file is opened, since very large files can make a browser tab slow.
- Why does “Load URL” fail for some addresses?
- Your browser fetches the URL directly, without going through our server, so the other site must allow cross-origin requests (CORS). Many public APIs do; many websites do not. If it fails, open the URL in a new tab, save the file and drop it onto the viewer. You can also link straight to a document with ?url= in the address.
- What is the difference between a JSON viewer and a JSON formatter?
- A formatter re-indents the text so it is readable. A viewer lets you explore the structure: collapse sections, search, see each value’s type and copy its path. This page does both; for more indentation options and JSON Lines formatting use the JSON Prettifier.
- Why did a long number change?
- JavaScript stores numbers as 64-bit floating point, so integers above 9,007,199,254,740,991 (2^53 − 1) lose precision when parsed. The viewer warns when this happens. If you control the API, send large IDs as strings.
- Can I view JSON Lines (.jsonl) or NDJSON?
- A .jsonl file holds one JSON value per line, which is not a single JSON document, so the viewer reports “More than one JSON value”. Use the JSON Prettifier with JSONL support to format it line by line.
- Can I fix invalid JSON here?
- The viewer shows the line, column and a plain-English reason for the first error and can jump straight to it. For common problems such as trailing commas, single quotes or comments, the “Repair automatically” button fixes the text for you; the Fix JSON tool handles the rest.
- Is the JSON Viewer free?
- Yes. There is no sign-up, no limit on use and no paid tier, and nothing is placed inside the tool area.
Sources & Standards
Syntax rules and path formats follow the standards below. Last reviewed .
- RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format
- ECMA-404: The JSON Data Interchange Syntax
- RFC 9535: JSONPath, Query Expressions for JSON
- jq manual: basic filters
More JSON tools: Compare JSON, JSON to List and the full JSON tools collection.