🧭

JSONPath Tester & Evaluator (RFC 9535)

Software · 2 inputs · Free

🧭

JSONPath Tester & Evaluator (RFC 9535)

2 inputs

Parameters

What is this tool?

JSONPath Tester & Evaluator (RFC 9535) helps developers with encoding, encryption and text processing. Runs a JSONPath query against a JSON document as specified in RFC 9535: the root $, name and index selectors, the wildcard *, slices [start:end:step], the descendant segment .., several selectors in one bracket, filters with @ and $ (==, !=, <, <=, >, >=, &&, ||, !) and the functions length(), count(), match(), search() and value(). The output shows the number of matches, the normalized path and value of each match, and the result array; syntax errors are reported with the character position. Limitation: match() and search() patterns run on the JavaScript regular expression engine (u flag), so constructs outside I-Regexp are accepted as well. The document is processed in your browser and never sent anywhere.

📘 Common mistakes · Worked example
JSON documentJSONPath query

Runs a JSONPath query against a JSON document as specified in RFC 9535: the root $, name and index selectors, the wildcard *, slices [start:end:step], the descendant segment .., several selectors in one bracket, filters with @ and $ (==, !=, <, <=, >, >=, &&, ||, !) and the functions length(), count(), match(), search() and value(). The output shows the number of matches, the normalized path and value of each match, and the result array; syntax errors are reported with the character position. Limitation: match() and search() patterns run on the JavaScript regular expression engine (u flag), so constructs outside I-Regexp are accepted as well. The document is processed in your browser and never sent anywhere.

The result is not exact or binding and is for information only; it is not an official document and cannot be used in official procedures. Confirm it with the competent authority or a professional before acting; no liability is accepted for losses arising from its use.

Last reviewed: · Methodology and sources

How is it calculated?

Runs a JSONPath query against a JSON document as specified in RFC 9535: the root $, name and index selectors, the wildcard *, slices [start:end:step], the descendant segment .., several selectors in one bracket, filters with @ and $ (==, !=, <, <=, >, >=, &&, ||, !) and the functions length(), count(), match(), search() and value(). The output shows the number of matches, the normalized path and value of each match, and the result array; syntax errors are reported with the character position. Limitation: match() and search() patterns run on the JavaScript regular expression engine (u flag), so constructs outside I-Regexp are accepted as well. The document is processed in your browser and never sent anywhere.

Inputs

ValueUnitExample
JSON document—{ "store": { "book": [ { "category": "reference", "author": "Nigel Rees", "title": "Sayings of the Century", "price": 8.95 }, { "category": "fiction", "author": "Evelyn Waugh", "title": "Sword of Honour", "price": 12.99 }, { "category": "fiction", "author": "Herman Melville", "title": "Moby Dick", "isbn": "0-553-21311-3", "price": 8.99 }, { "category": "fiction", "author": "J. R. R. Tolkien", "title": "The Lord of the Rings", "isbn": "0-395-19395-8", "price": 22.99 } ], "bicycle": { "color": "red", "price": 399 } } }
JSONPath query—$.store.book[?@.price < 10].title

What is this tool?

JSONPath Tester & Evaluator (RFC 9535) helps developers with encoding, encryption and text processing. Runs a JSONPath query against a JSON document as specified in RFC 9535: the root $, name and index selectors, the wildcard *, slices [start:end:step], the descendant segment .., several selectors in one bracket, filters with @ and $ (==, !=, <, <=, >, >=, &&, ||, !) and the functions length(), count(), match(), search() and value(). The output shows the number of matches, the normalized path and value of each match, and the result array; syntax errors are reported with the character position. Limitation: match() and search() patterns run on the JavaScript regular expression engine (u flag), so constructs outside I-Regexp are accepted as well. The document is processed in your browser and never sent anywhere.

Common mistakes

  • Fetching the last element with an old script expression. The query $.store.book[(@.length-1)] is rejected: JSONPath syntax error (position 14): unexpected (. Write $.store.book[-1] instead.
  • Writing a regular expression with the =~ operator. For $.store.book[?@.title =~ /of/] the tool reports: JSONPath syntax error (position 23): ] expected here. Use search(@.title, 'of') instead.
  • Asking for an array's length with .length. The query $.store.book.length raises no error, but it selects no node because there is no member called length; length is only available through the length() function inside a filter.
  • Using match() for a substring search. match() matches the whole string; use search() for an occurrence anywhere, or write the pattern as .*of.*.
  • Using a function without a comparison. For $.store.book[?length(@.title)] the tool reports: JSONPath syntax error (position 15): length() returns a value; it cannot be used as a test on its own, compare it with a value
  • Comparing a number with a string. @.price < '10' is always false; under the RFC, values of different types are never equal to or less than each other. Remove the quotes.
  • Starting the query without $. For store.book the tool reports: JSONPath syntax error (position 1): the query must start with $

📘 How to Write JSONPath Queries: RFC 9535 Filters and Functions by Example →

Sources

Key terms

JSON documentJSONPath query

Frequently Asked Questions

+JSONPath Tester & Evaluator (RFC 9535) — how is it calculated?

Runs a JSONPath query against a JSON document as specified in RFC 9535: the root $, name and index selectors, the wildcard *, slices [start:end:step], the descendant segment .., several selectors in one bracket, filters with @ and $ (==, !=, <, <=, >, >=, &&, ||, !) and the functions length(), count(), match(), search() and value(). The output shows the number of matches, the normalized path and value of each match, and the result array; syntax errors are reported with the character position. Limitation: match() and search() patterns run on the JavaScript regular expression engine (u flag), so constructs outside I-Regexp are accepted as well. The document is processed in your browser and never sent anywhere.

+Which values are required?

JSON document, JSONPath query.

+Is my data stored?

No. All calculations run in your browser; the values you enter are never sent to or stored on a server. If you press “Save”, the calculation stays only in your own browser and you can delete it at any time.

+Is it free?

Yes, all tools are free and require no sign-up.

Similar tools

Popular Tools

🧮

Free Calculators in One Place

Tax, finance, health, math and more — 500+ tools, all in one place.

Choose your cookie preference to continue

Records the site needs to work (theme, language, favourites) stay in your browser.

This site is free and funded by ads.

With your consent, Google Analytics cookies measure visits and Google AdSense cookies are used to show ads; the data is processed on Google servers abroad.

If you reject, the site works just the same.

Cookie Policy · KVKK notice