AZ Tools

JSON Pointer Resolver (RFC 6901)

Developer

A JSON Pointer is the standard, RFC 6901 way to address one value inside a JSON document with a slash-separated path like /user/roles/0. It's what JSON Schema $ref, JSON Patch, JSON Merge Patch, and many OpenAPI tools use under the hood. Paste a document and a pointer to see exactly which value it selects, pretty-printed. The resolver implements the spec precisely: the empty pointer returns the whole document, ~1 means a literal slash and ~0 means a literal tilde (so a key like "a/b" is reached with /a~1b), array indices must be 0 or unsigned with no leading zeros, and the special "-" token has no value on read. URI-fragment pointers (#/user/roles/0) are accepted and percent-decoded. It also lists every pointer in your document with a value preview, so you can click to discover the exact path to any node. Everything runs locally; nothing is uploaded.

Resolved value

"admin"

Pointers in this document (click to use)

(root){…} (3)
/user{…} (3)
/user/id42
/user/name"Ada"
/user/roles[…] (2)
/user/roles/0"admin"
/user/roles/1"editor"
/a~1b"slash in key"
/settings{…} (2)
/settings/theme"dark"
/settings/limits{…} (1)
/settings/limits/max100

Empty pointer = whole document. Escape / in a key as ~1 and ~ as ~0. URI fragments like #/a/b are accepted.

How to use

  1. Paste or edit the JSON document.
  2. Type a JSON Pointer (e.g. /user/name, or #/settings/limits/max), or click a row in the pointer list.
  3. Read the resolved value; escape a slash in a key as ~1 and a tilde as ~0.

Frequently asked questions

How is a JSON Pointer different from JSONPath?
JSON Pointer (RFC 6901) addresses exactly one value with a simple /-separated path and is used by JSON Schema, JSON Patch, and OpenAPI. JSONPath is a query language that can match many values with wildcards, filters, and recursive descent. Use this tool for the former; use the JSONPath tester for the latter.
What are ~0 and ~1?
Because / separates tokens and ~ is the escape character, a literal / inside a key is written ~1 and a literal ~ is written ~0. So the member "a/b" is reached with the pointer /a~1b, and "m~n" with /m~0n. When unescaping, ~1 is replaced before ~0, exactly as the RFC requires.
What does the empty pointer return?
An empty string is a valid pointer that refers to the whole document, so it returns the entire JSON value. Note that "/" is not empty — it's a pointer with one empty-string token, which selects the member whose key is the empty string.
Why did my pointer fail to resolve?
Common reasons: the member or array index doesn't exist, an array index has a leading zero (only 0, 1, 2… with no padding are valid), you used "-" (which has no value when reading), or a non-empty pointer didn't start with /. The error message names the exact token that failed.

Related tools