JSON Pointer (RFC 6901) Reference

The RFC 6901 JSON Pointer syntax, its escaping rules, and worked examples for addressing a single value inside a JSON document.

A JSON Pointer is a short string that addresses one value inside a JSON document. RFC 6901 defines the syntax: the root is the empty string, and each step is a slash followed by a reference token.

01Syntax

  • The whole document is the empty string.
  • An object member is addressed by its decoded key: /users.
  • An array element is addressed by its zero-based index: /users/0/name.
  • The two reserved characters are escaped inside a token: ~0 for ~ and ~1 for /.

02Examples

  • "" addresses the root value.
  • /a/b/0 addresses the first item of the array at key b.
  • /a~1b addresses the member literally named "a/b".
  • /m~0n addresses the member literally named "m~n".

03Limitations

Frequently asked questions

Is a JSON Pointer the same as a JSON Patch?
No. RFC 6901 defines how to address a value; JSON Patch (RFC 6902) is a separate format that uses pointers as its targets. This reference covers addressing only.
How do I point at a key that contains a slash?
Escape the slash as ~1, and escape a literal tilde as ~0. For example the key "a/b" becomes /a~1b.

Sources

  1. RFC 6901: JavaScript Object Notation (JSON) Pointer — IETF (accessed 2026-09-01)
  2. RFC 8259: The JavaScript Object Notation (JSON) Data Interchange Format — IETF (accessed 2026-09-01)