deftools.io JSON Tools

JSON Pointer Evaluator

Evaluate RFC 6901 JSON Pointer expressions against any JSON document. Resolve paths like /store/book/0/title, see matches live, and list every pointer in the tree.

/
Try:
0 B
JSON Pointer (RFC 6901) syntax
(empty)the whole document
/the empty-string key (root-level "")
/foothe foo member of the root object
/foo/0the first element of the foo array
/a/bnested: root.a.b
/foo/-the next (non-existent) array index — append target
/~1a literal slash (the / character as a key)
/~0a literal tilde (the ~ character as a key)
Escapes: ~1/, ~0~. Decode in that order. Array indices must be base-10, no leading zeros (except 0 itself), and - refers to the element after the last array member.
Copied!

About this tool

JSON Pointer (RFC 6901) is a standard syntax for pointing at a specific value inside a JSON document. Unlike JSONPath, it is a simple, deterministic path with no wildcards or filters — just a sequence of slash-separated reference tokens, like /store/book/0/title. It is the addressing scheme used by JSON Patch (RFC 6902), JSON Schema, OpenAPI/REL, and many configuration languages.

Given { "store": { "book": [{ "title": "Moby Dick" }] } }, the pointer /store/book/0/title resolves to the string "Moby Dick". The pointer /store/book/0 resolves to the whole first book object. An empty pointer resolves to the entire document.

Use this tool to verify pointers before shipping a JSON Patch, to find the exact path of a field in a large API response, or to learn how the two escape rules work: ~1 represents a literal slash, and ~0 represents a literal tilde.

FAQ

What is the difference between JSON Pointer and JSONPath?

JSON Pointer (RFC 6901) is a strict, deterministic path with no wildcards, filters, or recursive descent — it resolves to exactly one location or fails. JSONPath is a query language with features like $..recursive descent, [*] wildcards, and [?(...)] filters. Use JSON Pointer when you need a stable, canonical address for a single value (as JSON Patch and JSON Schema do).

What does a leading "/" mean, and what does an empty pointer mean?

An empty pointer string ("") refers to the entire document. The string "/" refers to the root-level key that is an empty string (""). Every non-empty pointer begins with a slash, and each subsequent slash starts a new reference token. So "/foo" is the "foo" member of the root, and "/foo/0" is the first element of that array.

How do I point at a key that contains a slash or tilde?

Replace every tilde with ~0 first, then every slash with ~1. So a key named "a/b" becomes the token "a~1b" and the pointer is "/a~1b". A key named "~tilde" becomes "~0tilde". Decode in the opposite order (~1 back to /, then ~0 back to ~).

What does "/-" mean in an array?

The special token "-" refers to the hypothetical element after the last member of an array — the position where a new element would be appended. It is valid in JSON Patch "add" operations but does not resolve to an existing value when evaluated, so this tool reports it as a non-existent element.

More json tools

Copied!