JSON Pointer (RFC 6901) Evaluator | See the Resolved Value and the Exact Failure Reason
Evaluate an RFC 6901 JSON Pointer against any JSON document and watch it resolve token by token. Decode ~0 and ~1 escapes, verify array indices, and get a precise reason when a pointer fails to resolve.
💡 About this tool
A JSON Pointer is a string like /users/0/name that addresses one location inside a JSON document. You meet them everywhere once you start working with APIs: JSON Patch (RFC 6902) operations, $ref in JSON Schema and OpenAPI, and error pointers in JSON:API responses. The syntax looks trivial until a key contains a slash or a tilde — then a/b has to be written as /meta/a~1b and c~d as /meta/c~0d, and it is surprisingly easy to get the escape wrong in your head.
This evaluator splits the pointer on /, unescapes each token (~1 → /, then ~0 → ~), and walks the document one step at a time. The resolution path shows exactly how far the traversal got, so when a pointer fails you can see whether it was a missing member, an out-of-range index, or a token that tried to descend into a scalar. The empty pointer returns the whole document root, matching the spec instead of throwing an error.
🧐 Frequently Asked Questions
Q. What's the difference between ~0 and ~1?
A. ~1 decodes to a slash / and ~0 decodes to a tilde ~. The order is fixed by the spec: replace ~1 first, then ~0. Doing it the other way around would mangle sequences like ~01, so this tool always applies ~1 before ~0.
Q. How do I reference an array element?
A. Use a zero-based integer, e.g. /users/0. Leading zeros like 00 or 01 are invalid. An index past the end of the array returns "Not found", and the path highlights the token where traversal stopped.
Q. Why does a trailing - fail?
A. - is the reserved token for "the slot after the last element". JSON Patch uses it to append, but as a read reference it points at nothing, so the evaluator reports it as having no value.
Q. Can I target a member whose key is the empty string?
A. Yes. For {"": 1} the value is referenced by / (a single slash). That's different from the empty pointer (nothing at all), which addresses the whole root.
Q. Does the pointer or document ever leave my browser? A. No — parsing and traversal run entirely in your browser, so you can paste internal API payloads without them being uploaded anywhere.
📚 Why pointers beat ad-hoc paths
If you've ever debugged a JSON Patch failing silently, the culprit is almost always an unescaped key. A field literally named application/json inside a config object is a classic trap: the obvious /headers/application/json traverses three levels, while the correct pointer is /headers/application~1json. Pasting both into an evaluator side by side makes the bug obvious in seconds.
JSON Pointer is also why OpenAPI's $ref: '#/components/schemas/User' looks the way it does — everything after the # is a JSON Pointer interpreted as a URI fragment. That shared grammar is deliberate: the same string can point into a local document, a remote file, or an HTTP response, which is exactly why tooling across the REST ecosystem standardized on it instead of inventing yet another path syntax.