JSON Pointer (RFC 6901)

Evaluate an RFC 6901 JSON Pointer against a document.

Open tool

Overview

The JSON Pointer evaluator applies an RFC 6901 pointer to a JSON document and returns the referenced value. Paste a document, paste a pointer like /users/0/email, and immediately see what value sits at that path.

JSON Pointer is the addressing syntax used by JSON Patch (RFC 6902), JSON Schema's $ref, and many HTTP error response formats (RFC 7807 problem details). Developers building or consuming APIs that use these specs reach for a json pointer tester to confirm a path resolves before wiring it into code.

How it works

A JSON Pointer is a sequence of /-separated reference tokens. Each token names an object member or selects an array index. Two characters need escaping inside a token: ~ becomes ~0 and / becomes ~1 — that's how a/b as a literal key is written.

The empty pointer ("") refers to the whole document. The pointer /- is only valid on arrays for appending; this tool also reports the path as a one-past-the-end placeholder so you can sanity-check before patching.

Examples

Document:
{ "users": [
  { "name": "Alice", "email": "a@x.com" },
  { "name": "Bob",   "email": "b@x.com" }
]}
Pointer: /users/0/email
Result:  "a@x.com"
Pointer: /users
Result:  [{"name":"Alice",...}, {"name":"Bob",...}]
Document: {"a/b": 1, "c~d": 2}
Pointer:  /a~1b
Result:   1
Pointer:  /c~0d
Result:   2

FAQ

How is JSON Pointer different from JSONPath?

JSON Pointer addresses exactly one location and has no wildcards or filters. JSONPath is a query language that can return many results. Pointer is the right tool for unambiguous addressing in specs; JSONPath is for searching.

What's the syntax for the URI fragment form?

When a pointer is used in a URI fragment, prefix with # and URL-encode reserved characters: #/users/0/email. The tester accepts both the plain form and the fragment form.

Why doesn't ~ work directly?

~ is the escape character. To match a literal ~ in a key, write ~0; to match a literal /, write ~1. The escape encoding is intentional so the same pointer syntax works in URI fragments.

Try JSON Pointer (RFC 6901)

An unhandled error has occurred. Reload ×