JSON Pointer Evaluator

Paste a JSON document on the left and an RFC 6901 JSON Pointer on the right; the resolved value streams in live underneath, syntax-highlighted and copyable. JSON Pointer is the simple /foo/bar/0 path syntax used by JSON Patch (RFC 6902) and most JSON Reference resolvers — for the richer query syntax (filters, wildcards, recursive descent) see the sibling JSONPath evaluator.

Presets — click to load the JSON and the pointer
Resolved value
No result yet — paste a JSON document and a pointer.
Tokens
    Syntax cheat-sheet
    SyntaxMeaning
    "" The empty string is the only valid pointer that does not start with /. It resolves to the whole document.
    /foo One segment selects a member of the current object or an element of the current array.
    /foo/0 Each segment is decoded and walked in order. A segment that looks like a non-negative integer is treated as an array index when the current value is an array.
    /- The literal - is the append sentinel: it is only valid inside an array and means “the (non-existent) next member” (RFC 6901 §4).
    /a~1b Inside a segment, ~1 decodes to a literal /. Decode order matters: ~1 first, then ~0.
    /a~0b ~0 decodes to a literal ~. A bare ~ that is not followed by 0 or 1 is a syntax error.
    /0 A numeric-looking segment is an array index only when the current value is an array. Inside an object it is just the literal string key "0".
    / An empty segment is a legal key. Resolves to the property whose name is the empty string.
    Notes & limitations
    • The evaluator runs entirely in your browser — the JSON you paste never leaves this tab.
    • Resolution follows RFC 6901: each segment is walked in order; the first missing member fails the whole lookup. The error message reports which segment failed.
    • The - append sentinel is only valid inside an array. Inside an object it is a literal key named "-".
    • Decoding order is ~1 first, then ~0. Encoding does the reverse: ~ → ~0, then / → ~1.
    • TypeScript users: this is a pure-function library — see src/lib/tools/json-pointer.ts for parsePointer, resolvePointer, buildPointer, and escapePointerSegment.