JSON Path Explorer — Browse Nested JSON and Copy Paths

Inspect nested JSON as a bounded tree, copy JavaScript-style property paths and RFC 6901 pointers, and export structured records.

JSON Path Explorer

Preparing workspace…

A JSON path viewer displays a JSON document as a navigable tree and gives each value an exact location you can copy. Paste valid JSON or select a local JSON file, build the tree, and choose a property to obtain a JavaScript-style path such as $.products[0].price or an RFC 6901 JSON Pointer such as /products/0/price. Objects, arrays, scalars, booleans, and null values are labeled independently, so a property name is not mistaken for its value. This workspace intentionally limits input size, visible tree depth, and total nodes. It reports when traversal has been shortened instead of implying that hidden branches were inspected. The result is a structural reading of one supplied document, not a remote API request or a promise that a path will exist in later data.

JSON Path Viewer At a Glance

FactorDetails
Input formatValid JSON document or .json file, up to 3 MiB
Tree viewUp to 3,000 nodes and a chosen maximum depth
Path stylesJavaScript dot/bracket notation and RFC 6901 JSON Pointer
ArraysZero-based numeric positions
ExportsJSON report and CSV records of inspected nodes
InterpretationPaths identify positions in this parsed document, not a schema contract

How a JSON Tree Is Organized

JSON uses two structures that can contain other values: objects with named members and arrays with ordered positions. A path describes how to move from the root through one or more of these structures until you reach a selected member. The viewer begins at $, then descends one level whenever it encounters a nested object or array. Scalar values such as a number or string cannot contain further keys; they appear as leaves. A parent record reports how many immediate properties or array items were present, and each child retains a reference to its parent. This makes the exported structure useful when documenting how an unfamiliar response is organized rather than reading an unbroken wall of braces and brackets.

Why a Property Path and a JSON Pointer Differ

A JavaScript-style property path and an RFC 6901 JSON Pointer solve related but different problems. The expression $.orders[0].id resembles property access in JavaScript and is convenient when explaining the location of one item in a tutorial. A pointer starts at the document root without a dollar sign and uses slash-separated tokens, so the same target becomes /orders/0/id. A literal slash inside a pointer token must be encoded as ~1, and a tilde must be encoded as ~0; otherwise a pointer could change meaning. The viewer computes both paths from parsed keys rather than using a simple string substitution. That distinction is particularly important for JSON objects with punctuation in their property names.

Working with Special Characters in Keys

JSON object keys may contain spaces, dots, leading digits, quotation marks, and even the exact text __proto__. Those characters are legal string keys, but many cannot be represented safely with ordinary dot notation. For example, an object member called product.price is one key, not two nested members; it requires bracket notation such as $["product.price"]. A member called 2027 may be written $["2027"] rather than interpreted as an array index. The explorer serializes these unusual keys as JSON strings inside brackets so that copied paths preserve the intended key boundaries. This avoids a subtle documentation error when someone copies a visually plausible but syntactically different expression into an application.

Checking Arrays and Nested Records

When an array contains objects, the viewer assigns an index to each object based on its current position in the input. An item at index zero is the first element, not an element bearing the number zero as its identifier. If records are later inserted, removed, or sorted, an index-based path can point to a different object. The tree makes it easier to spot this limitation by showing array parents separately from object parents. For repeatable data extraction from changing API responses, a semantic lookup by a unique property may be more reliable than recording a fixed array index. This tool shows locations; it does not execute filters, wildcard selectors, or full JSONPath query expressions.

Worked Example: Product and Variant Records

Consider a document containing a products array. Its first element is an object with a name and a variants array, and the first variant contains a price of 19.5. Choosing the price produces a path similar to $.products[0].variants[0].price, while the corresponding pointer is /products/0/variants/0/price. If the response also includes products[1], that second object has a different path even if its own variant is also at position zero. When preparing a field mapping for an importer, copy the path and inspect the actual value type. A number formatted as 19.5 is not necessarily interchangeable with the string "19.5" in strict downstream validation.

How to Use the JSON Path Explorer

Start with a complete JSON value, which can be an object, array, string, number, boolean, or null. Paste source text or select a file, then choose a maximum tree depth appropriate for the document. Build the tree and scroll through the indented records. Each line shows the key or index, an indication of the value type, and a shortened preview of content or child count. Select the location you need and choose the desired path style before copying it. If your browser blocks clipboard access, use the report download. The report contains both path representations and observed value types, allowing further review without keeping the entire original document open in the workspace.

Safeguards for Large and Deep Documents

A large JSON response can consume substantial memory even when its byte size looks moderate. The browser must first parse the input and then create a second representation for the tree, so unlimited nested traversal would be a poor default. This implementation rejects documents above 3 MiB, limits traversal to 3,000 visible records, and lets you cap nesting at a maximum depth of 36. These are intentional operational bounds, not claims about the JSON specification itself. If a report indicates omitted nodes, any conclusion about the unseen remainder is incomplete. You can narrow the input before inspection, but do not interpret a truncated tree as evidence that a missing property does not exist.

Handling Invalid JSON and Unexpected Types

Trailing commas, single-quoted strings, unquoted member names, and JavaScript comments may look acceptable in a code editor but are invalid in strict JSON. The parser rejects them rather than attempting an undocumented repair. It also preserves the distinction between null and an absent member: null is a value present at a location, while an absent member has no node. An empty array still has its own node even though it has no children. These distinctions matter when diagnosing why a consuming application ignores a setting or fails a schema validation. A successful parse confirms JSON syntax, not conformity to the field names, permitted values, or required properties of a particular API.

Exporting a Structure for Technical Documentation

The JSON report records each inspected node with its path, pointer, depth, type, and preview, while the CSV export turns those records into rows that can be filtered. These exports are representations of the inspected structure; they are not backups of the original JSON document and should not be used as a substitute for the source. CSV consumers may handle long strings, newline characters, or formula-looking values differently, so the export quotes fields and shields formula-leading text. Before distributing a structural report, review previews for credentials or personal information. Even a path inventory can reveal sensitive field names, internal identifiers, or fragments of values.

Interpreting JSON Structures Across Versions

An API may add optional members, rename keys, or change an array into an object across releases. A path copied from one response should therefore be tested against representative samples from the versions you support. If a member is optional, its path can be correct yet absent in some documents. When designing a transformation, record what happens when a path is missing, when its value is null, and when a number arrives as a string. This avoids treating one successful tree inspection as a promise about every future response. The companion JSONL to JSON converter is useful when newline-delimited records need to be assembled into a document before their common structure can be inspected.

Where Path Exploration Stops

This viewer deliberately does not fetch remote JSON APIs, infer schemas, execute user-supplied JavaScript, or evaluate complex JSONPath expressions. The term path here means the exact location of an observed node rather than an executable selector language with predicates, recursive descent, or wildcards. Keys are handled as data, including keys that would be dangerous as object-property assignments in other programming contexts. If you need a broader transformation, export the inspected paths and implement the extraction in a controlled parser with appropriate error handling. The output is most reliable as an aid to understanding a known sample and reviewing the actual types present at specific locations.

Frequently Asked Questions

Does this viewer support JSONPath filters such as [?(@.active)]?

No. It generates exact paths to observed nodes in one parsed JSON document. Filters and wildcard queries require a different evaluation engine and can match varying numbers of records.

What is the root JSON Pointer?

The empty string represents the root in RFC 6901. A slash begins a child token. By contrast, the JavaScript-style display uses a dollar sign for the root.

Can I view an array at the root of a document?

Yes. An array is valid top-level JSON. The first record appears beneath the root at index zero, and its pointer begins with /0.

Why is a property name shown in brackets?

Bracket notation preserves unusual names such as keys containing spaces, punctuation, or periods. Dot notation could otherwise be interpreted as a different nested structure.

Does a successful result prove that my JSON follows a schema?

No. A syntactically valid document can still lack required fields or contain values of unsupported types. Schema validation is a separate assessment.

What happens when my JSON is too large?

The tool rejects oversized input and marks omitted nodes or branches when its traversal limits are reached. It does not silently claim that every property was inspected.

Conclusion

An exact property path is useful only when its source, type, and structural assumptions are understood. Retain the original JSON, keep traversal limits visible, and verify paths against changing records before relying on them in production transformations.