How to Open and Read a JSON File
Open a local .json file, check its syntax, and explore nested values without installing an editor.
A .json file is usually UTF-8 text containing one JSON value. You can open it in a text editor to read the source. For a large object or array, a tree viewer makes the nesting easier to follow.
Open a file in the viewer
- Open the JSON viewer.
- Choose a local
.jsonfile or drag it into the workspace. - Check the syntax result. If it is valid, expand only the branches you need.
- Copy a selected value or its path. Download the full document before reloading if you made edits.
The file is processed in your browser. Opening it here does not create a public URL for its contents. The tree preview has a node limit, but the underlying text remains available for copy and download.
What the extension tells you
The .json extension describes the intended format; it does not prove the contents are valid JSON. A server may save an HTML error response with that extension, or a file may be truncated. Use the JSON validator to locate a syntax error. Check the first characters if the validator reports an unexpected <: that often indicates HTML rather than JSON.
Read a small example
{
"project": "demo",
"members": [
{ "name": "Alex", "active": true },
{ "name": "Sam", "active": false }
]
}
The root is an object. members is an array of two objects. $["members"][1]["name"] identifies "Sam". Use the JSONPath tester when you want to run a path query rather than manually expand the tree.
If you need to change the file, use the JSON editor, validate the result, and download a new copy. See JSON syntax for the punctuation rules.