How to view JSON online
- Paste your JSON into the editor on the left, drop a file onto it, or press Open.
- Explore the result in the Tree tab, search keys and values, and copy any value or path.
- Press Format (Ctrl+Enter) to beautify it with 2 or 4 spaces, or Minify to compact it.
- Use Copy Output or Download to take the formatted JSON with you.
What can you do with the JSON viewer?
Paste JSON, drop a file onto the editor or press Open, and the tree view shows the structure instantly. Click any object or array to expand or collapse it, use Expand and Collapse to open everything or fold it back to the first level, and search keys and values at the same time. Hover a row to copy its value or its path, for example $.users[0].address.city, ready to paste into code.
Edit JSON right in the tree
You do not have to switch to the text editor to make a change. Double-click a value to edit it, or use the pencil icon on its row. Type a number, true, false, null or a quoted string: values are read as JSON, so 42 becomes a number while "42" stays a string, and text that is not valid JSON is kept as a string when the value already was one. Double-click a key to rename it, press the plus icon on an object or array to add a property or item, and the trash icon to delete. Every edit is written back into the editor as a single undoable change, so Ctrl+Z restores the previous text. Editing is turned off for large documents, because each change rewrites the whole text.
Tree view or formatted text?
The Tree tab is best for exploring: it shows types by colour, counts the children of every node and lets you jump to what you need. The Formatted tab shows the same data as indented text with 2 spaces, 4 spaces or compact output, and optional alphabetical key sorting. Use Format to write the pretty version back into the editor, or Minify to compress it.
Understanding the colours and types
Strings are shown in orange, numbers in green, booleans in blue and null in purple, so a value of the wrong type stands out at a glance. A number written as a string, such as "42", keeps its quotes and its string colour, which is one of the quickest ways to spot a data-type bug in an API response.
Working with API responses
Copy a response from your browser's network tab, curl output or a log line and paste it in. If the text contains single quotes, comments or trailing commas, press Fix JSON. Use the status bar to see the size, depth and number of nodes, which helps you estimate how heavy a payload is before it reaches production.
Tips for very large JSON files
Collapse everything first and expand only the branch you care about. Search narrows the tree to matching paths, which is faster than scrolling through hundreds of thousands of rows. For files above a few megabytes the editor automatically switches to a lighter mode, but parsing and the tree stay responsive because they run off the main thread.
Works offline
After your first visit the app keeps its code and editor in your browser, so you can open it with no connection: paste JSON, format, validate, convert and diff as usual. Pages you have not opened yet fall back to the main tool. You can also install it from your browser's menu (Install app) to get a window of its own. Because everything already runs locally, going offline changes nothing about your data.
Share JSON without uploading it
Press Share to put your JSON into a link. The data is compressed and stored in the part of the address after the # sign, which browsers never send to any server, so there is no upload and no account. Anyone with the link sees the same JSON. Links are limited to roughly 8,000 characters after compression, so they suit snippets, configs and API samples rather than huge files. Treat a link like the data itself: do not paste it anywhere public if the JSON is sensitive.
A viewer built for large files
Most online formatters freeze on big payloads because they render every node. This tool parses in a background thread and virtualizes the tree, drawing only the rows on screen, so multi-megabyte API dumps and exports stay responsive. Search matches keys and values and opens the path to each hit.
Private by design
There is no upload step and no backend. Your JSON is processed by JavaScript running in your own browser tab, so tokens, customer records or internal configuration never reach a third-party server. You can verify this in your browser's network tab.
A practical guide to reading JSON
JSON documents are made of only six kinds of value: objects (key and value pairs in braces), arrays (ordered lists in square brackets), strings, numbers, true or false, and null. Everything else is built by nesting these. Reading an unfamiliar document is mostly a matter of finding out which keys an object has, how deep it goes, and whether the items of an array all look the same.
A good way to explore a response is top-down. Collapse the whole tree, look at the keys of the root object and their types, and expand the branch that holds the data you need. The count shown next to every object and array tells you how big a branch is before you open it, so you can skip a list of ten thousand items and go straight to the metadata beside it.
Walking through an API response
Paginated APIs usually wrap their data in an envelope: the items live under a key such as data, results or items, and the rest of the object holds paging information (a total, a next-page cursor, links). When a value is not where you expect it, look at the envelope first.
The example below has a users array whose items do not all have the same shape. The second user has no score key at all, and email is null. In code these are different cases: a missing key is undefined in JavaScript, while null is an explicit empty value. The tree view shows null in its own colour so that you can tell them apart at a glance.
{
"page": 1,
"total": 2,
"users": [
{ "id": 101, "name": "Ada", "email": "ada@example.com", "score": 9.5 },
{ "id": 102, "name": "Alan", "email": null }
]
}Things that surprise people in JSON
Numbers are not typed. JSON has one number format, so 1 and 1.0 are the same value, and parsers that use floating point (JavaScript included) cannot represent integers above 9,007,199,254,740,991 exactly. IDs that large are normally sent as strings. If you see a long number whose last digits look rounded, that is the reason.
A number in quotes is a string. The value "42" and the value 42 are different, and sorting or comparing them in code gives different results. The tree view keeps the quotes and colours strings and numbers differently, which makes this kind of bug easy to spot.
Duplicate keys are allowed by the syntax but their meaning is undefined: most parsers keep the last one and silently drop the others. JSON has no comments and no trailing commas, and keys must be in double quotes. Files that allow those things are usually JSONC (JSON with comments), JSON5, or JavaScript object literals, not JSON. The Fix JSON button repairs the common cases.
Text is Unicode. Characters can appear escaped (for example \u00e9 for the letter é) and the viewer shows them decoded. Control characters inside strings must be escaped, which is why a raw line break inside a string makes a document invalid.
JSON, JSON Lines and related formats
JSON Lines (also called NDJSON) stores one complete JSON value per line, with no enclosing array. It is common in logs and data exports because files can be appended to and processed line by line. A JSON Lines file is not valid JSON as a whole, so paste one line at a time, or wrap the lines in an array and separate them with commas.
YAML is a superset of JSON in practice and is often preferred for hand-written configuration. CSV is flat and cannot express nesting, so nested JSON is flattened with dotted column names when you convert it. The converters in the Code tab cover YAML, CSV and XML.
Working faster
Press Ctrl+Enter (Cmd+Enter on a Mac) to format, and Ctrl+Shift+Enter to minify. Use the search box in the Tree tab to find a key or value anywhere in the document; every parent of a match opens automatically. Hover a row to copy its value or its path, which you can paste straight into code or into the JSONPath tester to select many similar values at once.
Use the status bar as a quick health check: the size, depth and node count tell you how heavy a payload is. A response with a great depth or a very large node count can be a sign that an API is returning more than the client needs.
What is JSON?
JSON (JavaScript Object Notation) is a lightweight, text-based data format that is easy for people to read and for machines to parse. It is the de facto standard for web APIs, configuration files and data exchange between services. A JSON document is built from just six value types: objects, arrays, strings, numbers, booleans and null.
{
"name": "Ada",
"age": 36,
"admin": true,
"skills": ["math", "code"],
"address": { "city": "London" },
"manager": null
}JSON is stricter than JavaScript object literals: keys and strings must use double quotes, trailing commas are not allowed and comments are not part of the specification (RFC 8259).
Why format JSON?
APIs usually return minified JSON on a single line, which is efficient for machines but unreadable for people. Formatting (also called pretty printing or beautifying) adds consistent indentation and line breaks so that you can scan the structure, spot mistakes and review changes. Minifying does the opposite and strips whitespace to reduce size.
Frequently asked questions
How do I fix invalid JSON?
Press Fix JSON. It repairs common problems such as single quotes, unquoted keys, trailing commas, comments and missing brackets. If something remains broken, the status bar and Go to error button point to the exact line and column.
Is my JSON uploaded to a server?
No. Parsing, validation, formatting, diffing and code generation all run inside your browser, using a Web Worker. Your data is never sent to any server, which makes the tool safe for API responses, configuration files and other sensitive payloads.
Does it work offline?
Yes, after the first visit. The editor and tools are stored in your browser, so you can use them without a connection. Only the TypeScript, CSS and HTML language workers used for extra highlighting in the Code tab are downloaded the first time you use them.
How large a JSON file can I open?
Files of 20 MB and more work. Parsing happens off the main thread and the tree view is virtualized, so only the rows you can see are rendered. The editor switches to a lighter mode for very large documents.
What is the difference between formatting and minifying JSON?
Formatting (pretty printing) adds line breaks and indentation so people can read the data. Minifying removes all optional whitespace to make the payload as small as possible for network transfer or storage. Both produce identical data.
Fix common JSON errors
- Unexpected token '<' in JSON at position 0
- Unexpected end of JSON input
- Expected property name or '}' in JSON
- Trailing comma in JSON
- Expected ',' or '}' after property value in JSON
- "undefined" is not valid JSON
- Bad control character in string literal in JSON
- Unexpected non-whitespace character after JSON
- Unexpected token 'N' or an invisible character in JSON
JSON examples to try
- Simple JSON Example
- JSON Array Example
- Nested JSON Example
- User Profile JSON Example
- Paginated API Response JSON Example
- Product Catalog JSON Example
- Order and Invoice JSON Example
- Blog Posts JSON Example
- package.json Example
- GeoJSON Example
- Application Config JSON Example
- Weather API JSON Example
Cheat sheets
More JSON tools
- JSON Validator
- JSON to TypeScript
- JSON to Go Struct
- JSON to Python (Pydantic)
- JSON Diff
- Diff Checker
- JSON Minifier
- JSON Pretty Print
- JSON to YAML
- JSON to CSV
- JSON to XML
- Large JSON Viewer
- JSON Tree Viewer
- JSON File Viewer
- JSON Sorter
- JSON to Zod
- JSON to Rust
- JSON to Java
- JSON Schema Validator
- JSON to JSON Schema
- JSONPath Tester
- JSON Path Finder