CoreJSON

JSON Pointer

This is an RFC 6901 JSON Pointer query tool. Paste a JSON document, enter a pointer path such as /users/0/roles/1, and the tool locates the node and outputs its value and type. It supports ~0 (tilde) and ~1 (slash) escaping, and the empty string refers to the root node. The query runs locally in your browser and nothing is uploaded.

Open in the workbench Runs locally · nothing is uploaded

How to use it

  1. 1

    Paste the JSON document

    Put the data to query into the input, or open a local file.

  2. 2

    Enter a JSON Pointer

    Start with / such as /config/theme. Use /0 for the first array element, and the empty string for the whole document root.

  3. 3

    Pause to locate

    The tool outputs the matched value and its type (object / array / string / number / boolean / null).

  4. 4

    Copy the result

    The matched node value can be copied on its own; if the path does not exist it clearly reports which segment failed.

Key features

Strict RFC 6901

The empty string points to the root, segments are separated by /, and ~0 / ~1 escaping is handled per the spec.

Type annotation

The matched node is marked as object, array or scalar so the result cannot be misread.

Precise failure reporting

When the pointer is malformed or the path does not exist it states exactly which step failed, instead of returning a confusing null.

Escaping examples

A key containing / is written ~1 and one containing ~ is written ~0, and the tool resolves them correctly.

Worker-based local compute

The query runs on a background thread in your browser and the data is not uploaded.

Free, no sign-in

Open and use it — no registration and no ads.

Common errors & troubleshooting

  • ! A pointer must start with /; a form without the leading slash (such as users/0) is not a valid JSON Pointer (only the empty string special-cases the root).
  • ! A / inside a key must be written ~1 and a ~ must be written ~0 — this is the RFC 6901 escaping rule.
  • ! Array indices are zero-based, so /items/0 is the first element.
  • ! JSON Pointer is also the foundation of JSON Patch and $ref, so learning the syntax pays off in both places.

Frequently asked questions

How is JSON Pointer different from JSONPath?

JSONPath supports wildcards, filters and other query expressions and may return multiple results; JSON Pointer points to exactly one location in a document with a minimal syntax, and is used by specs such as JSON Patch and $ref.

What happens when the path does not exist?

It reports that the path does not exist and points out the failing segment, rather than returning null and letting you think a value was found.

Is my data uploaded?

No. The query happens locally in your browser.

How do I target the root document?

Use the empty string — by definition the empty JSON Pointer refers to the whole document.

Related tools