How to use the JSON viewer
- 1Paste JSON into the JSON box, press Open file to load a
.jsonfile, or press Example. - 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.
- 3Switch View between Formatted, Tree and Minified, and set Indent and Sort keys.
- 4In Tree view, type in Search keys and values to list every matching path, or use Expand all and Collapse all.
- 5Press Copy or Download to save
data.jsonordata.min.json.
Example
{"name":"Ada Lovelace","born":1815,"languages":["English","French"],"id":12345678901234567890}{
"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:
| Error | Fix |
|---|---|
| Trailing comma after the last item | Delete the comma before } or ] |
Single quotes 'name' | Use double quotes |
Unquoted key {name: 1} | Quote it: {"name": 1} |
True, None, NaN, undefined | Use true, null or a string |
Comment // … | Remove it (JSON has no comments) |
| Line break inside a string | Write 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 view and search
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.

