Format Code Now
/

JSON Navigator

FV-57

Paste JSON to browse it as a tree you can fold open and shut. Click any key, or press Enter on it, and its path appears under the tree, ready to copy in JSONPath, JavaScript or JSON Pointer form.

Runs in your browser. Nothing is uploaded.

JSON

Tree

Path Click a key to see its path

How to use it

  1. Paste your JSON, or open a .json file.
  2. Choose how many levels start open, or keep All levels.
  3. Pick a path style: JSONPath, JavaScript or JSON Pointer.
  4. Click a key or value, then press Copy path.

Three path styles

JSONPath writes $.store.books[0].title, the form many query tools and test libraries expect. JavaScript writes data.store.books[0].title, which you can paste into code after naming your variable data. JSON Pointer writes /store/books/0/title, as used in JSON Patch and schema references. Keys with spaces or symbols are quoted, as in $['stock id'], and in a pointer ~ and / become ~0 and ~1.

Reading large or deep documents

Each object and array shows how many keys or items it holds, so you can see the shape before opening it. Start with one, two or three levels open to keep a big response readable. Values are shown exactly as written, so long IDs are not rounded. A very large document shows its first 20,000 values, and the status line says when the view is cut.

How it differs from a text tree

This page is for finding your way around and copying paths by clicking. It does not edit, search or reformat the JSON. Copy and Download give back the JSON you pasted, unchanged. Invalid JSON is rejected with the line and column of the first problem.

Error messages and what to do

MessageWhat it meansFix
Expected a string keyInside an object the parser wanted a key in double quotes, often because of a trailing comma.Quote the key, or remove the comma before the closing brace.

Questions people ask

How do I find the path to a value in JSON?

Paste the JSON, open the tree to the value you want and click its key. The path appears in the bar under the tree, in the style you picked, and Copy path puts it on your clipboard. Clicking the root shows that the root path is empty in JSON Pointer.

What is the difference between JSONPath and JSON Pointer?

JSONPath starts with $ and uses dots and brackets, as in $.items[2].name. It is used by query tools. JSON Pointer is a slash-separated string such as /items/2/name, defined in RFC 6901 and used by JSON Patch and JSON Schema references.

Can I collapse and expand parts of the tree?

Yes. Every object and array folds open and shut with a click or the keyboard. The Open at first setting decides how many levels are open when the JSON is first shown; you can then open or close any node by hand.

Are large numbers shown correctly?

Yes. The tree shows each number exactly as it is written in your JSON, so 12345678901234567890 is not turned into 12345678901234567000 as it would be after a normal JavaScript parse.

Is my JSON uploaded?

No. The JSON is parsed and drawn in your browser. Nothing is sent to a server, and the paths you copy go straight to your clipboard.

About this tool

Objects and arrays fold open and shut; the counts beside them say how many keys or items are inside. Click or press Enter on any key to see its path below the tree, ready to copy: JSONPath like $.store.books[0].title, JavaScript like data.store.books[0].title, or JSON Pointer like /store/books/0/title. Keys with spaces or symbols are quoted, as in $['stock id']. Values are shown exactly as written, so big numbers are not rounded. Very large documents show the first 20,000 values. Invalid JSON is rejected with its line and column.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.