JSON Pointer Resolver Tool

Tip: Empty pointer returns the full JSON document. Escape / as ~1 and ~ as ~0.
Left JSON Input
Right Result
Ready. Paste JSON and resolve a pointer (empty = root).

JSON Pointer Resolver Tool (RFC 6901)

The JSON Pointer tool resolves RFC 6901 pointer paths to extract a specific value from a JSON document. A JSON Pointer is a standardized, deterministic path format used in APIs, JSON Patch operations, and configuration files. It lets you target a precise field by using a slash-delimited path like /user/profile/email. This tool helps you test and validate pointer paths quickly, without writing code or running scripts.

JSON Pointer is different from JSONPath or JMESPath. It is intentionally simple: no filters, wildcards, or complex expressions. That simplicity makes it reliable for machine-to-machine use cases such as JSON Patch, OpenAPI references, and configuration overrides. If you need complex querying, use JSON Path instead. If you need deterministic paths for patching or referencing, JSON Pointer is the right tool.

How JSON Pointer works

JSON Pointer uses slash-separated segments to navigate objects and arrays. The root of the document is represented by an empty string. Each segment references either an object key or an array index. For example:

  • /user/name points to the name field inside user.
  • /items/0/title points to the title field of the first array item.
  • /meta points to the whole meta object.

Special characters in keys are escaped. The tilde ~ becomes ~0 and the slash / becomes ~1. This ensures pointers remain unambiguous even when keys contain these characters.

How to use the JSON Pointer tool

  1. Paste JSON in the left editor.
  2. Enter a JSON Pointer path in the pointer input field.
  3. Click Resolve to retrieve the value on the right.
  4. Copy the output or adjust the pointer as needed.

Example: resolving a pointer

Input JSON:

{
  "user": {
    "id": 5,
    "name": "Avi",
    "profile": {
      "email": "avi@example.com",
      "roles": ["admin", "editor"]
    }
  }
}

Pointer: /user/profile/email

Result:

"avi@example.com"

Example: pointer into arrays

Pointer: /user/profile/roles/1

Result:

"editor"

Escaping special characters

If your key includes a slash, escape it. Example JSON:

{
  "meta/data": {
    "value": 42
  }
}

Pointer to value: /meta~1data/value

Similarly, a key with a tilde like version~1 must be escaped as version~01.

Common errors and how to fix them

  • Invalid JSON: The pointer resolver requires valid JSON. Fix syntax issues with JSON Validator.
  • Pointer not found: The path may be incorrect or misspelled. Verify key names and array indexes.
  • Wrong array index: Arrays are zero-based. The first item is index 0.
  • Unescaped characters: If keys contain / or ~, escape them using ~1 and ~0.
  • Empty pointer confusion: An empty pointer refers to the entire JSON document.

Best practices for JSON Pointer

  • Use JSON Pointer for deterministic paths in APIs and patch operations.
  • Keep pointer paths documented alongside API specs or schemas.
  • Validate pointer paths against sample payloads before production use.
  • Use JSON Formatter to inspect structure and avoid path errors.
  • Use JSON Patch when you need to apply changes with pointers.

Pointer cheat sheet

  • / starts a new path segment.
  • /items/0 points to the first array element.
  • /a~1b points to a key named a/b.
  • /a~0b points to a key named a~b.
  • An empty string points to the entire document.

Using JSON Pointer with JSON Patch

JSON Patch operations like replace and remove require JSON Pointer paths. If you are building patch payloads, test each pointer here before using it in production. This prevents failed patches caused by typos or incorrect array indexes. You can also format your JSON first to make pointer construction easier.

Workflow checklist

  1. Format JSON for readability.
  2. Identify the exact path and convert it to JSON Pointer.
  3. Escape special characters in keys.
  4. Resolve the pointer to confirm it returns the expected value.
  5. Use the pointer in patches or references.

Troubleshooting tips

If a pointer fails, confirm each segment in order. Start by checking the top-level keys, then move deeper. If the JSON contains arrays, verify the index is correct. For keys with special characters, apply the ~0 and ~1 escaping rules carefully.

JSON Pointer vs JSONPath

JSON Pointer is strictly positional and deterministic: it points to a single location. JSONPath is expressive and can return multiple matches. If you need queries or filters, use JSONPath. If you need a strict pointer for patching or referencing, use JSON Pointer.

JSON Pointer in $ref references

JSON Pointer is also used in OpenAPI and JSON Schema references. For example, a $ref might point to #/components/schemas/User. The part after # is a JSON Pointer. This tool helps you validate those reference paths against real JSON.

Use cases

JSON Patch: RFC 6902 patches rely on JSON Pointer paths to identify fields.

OpenAPI/Swagger: JSON Pointer is used for schema references.

Configuration overrides: Apply precise overrides in configuration files.

Debugging: Quickly extract a nested value without writing a script.

FAQs

Does JSON Pointer support wildcards?
No. JSON Pointer is deterministic and does not include wildcards or filters.

Can I use JSON Pointer with arrays?
Yes. Use numeric indexes like /items/0 to target array elements.

How do I point to the root?
Use an empty string as the pointer to return the full JSON document.

What if my key contains a slash?
Escape it with ~1 (e.g., /meta~1data).

Is my data uploaded?
No. All resolution happens locally in your browser.

How is this different from JSONPath?
JSONPath can return many results with filters; JSON Pointer is a single deterministic path.

Can I use this for schema references?
Yes. JSON Pointer is the standard for referencing parts of JSON Schemas.

Why does my pointer return null?
The path may not exist, or the value itself may be null. Verify the structure and pointer path.

Can JSON Pointer return objects or arrays?
Yes. If the pointer resolves to an object or array, the full value is returned.

Do I need to URL-encode JSON Pointers?
Only when using them in URLs. JSON Pointer itself is not URL-encoded.

Is JSON Pointer case-sensitive?
Yes. JSON keys are case-sensitive, so the pointer must match exactly.

Can I use JSON Pointer with YAML?
JSON Pointer is defined for JSON, but many YAML parsers use similar paths when YAML is treated as JSON.

Keyword‑targeted phrases

  • json pointer resolver
  • rfc 6901 json pointer
  • json pointer online
  • json pointer extract value
  • resolve json pointer