🔒 Runs in your browser — nothing is uploaded✓ Free, no signup

JSONPath Tester

Evaluate JSONPath expressions on your JSON directly in the browser — no upload, no tracking. Supports filters, recursive queries, and instant copy/download.

Tip: Use .. for recursive search and filters like [?(@.price < 10)].
Loading...

When should you use JSONPath?

Quick examples to help you start fast.

Extract values
Pick specific fields from large API responses.
Example: $.data.items[*].id
Debug filters
Test conditions like price, status, flags.
Example: $.store.book[?(@.price < 10)]
Recursive search
Find a key anywhere in deeply nested JSON.
Example: $..price
Get arrays for other tools
Copy output into CSV converters or formatters.
Example: $.users[*].email

JSONPath Usage

Quick reference for common operators.

$
the root object/element
@
the current object/element
. or []
child operator
..
recursive descent. JSONPath borrows this syntax from E4X.
*
wildcard. All objects/elements regardless their names.
[]
subscript operator. XPath uses it to iterate over element collections and for predicates. In Javascript and JSON it is the native array operator.
?()
applies a filter (script) expression.
()
script expression, using the underlying script engine.
Tip: Filters look like [?(@.price < 10)] and recursive search looks like $..price.

How to use the JSONPath Tester

  1. 1

    Paste your JSON

    Paste the JSON document you want to query into the Input JSON editor.

  2. 2

    Write a JSONPath expression

    Start with $ (the root). Use .key for children, [*] for every array item, .. for recursive search and [?(...)] for filters.

  3. 3

    Click Run JSONPath

    Matching values appear in the results panel along with the number of matches.

  4. 4

    Refine and copy

    Adjust the expression until you get exactly the values you need, then copy the results.

Examples

Querying a store document

JSON

{
  "store": {
    "book": [
      { "title": "A", "author": "X", "price": 8 },
      { "title": "B", "author": "Y", "price": 12 }
    ],
    "bicycle": { "price": 19 }
  }
}

Expressions → results

$.store.book[*].author
→ ["X", "Y"]

$..price
→ [8, 12, 19]

$.store.book[?(@.price < 10)].title
→ ["A"]

$.store.book[-1:]
→ [{ "title": "B", "author": "Y", "price": 12 }]

Common errors and how to fix them

No matches found
Keys are case-sensitive and must match exactly. Check the path one level at a time, e.g. $.store first, then $.store.book.
Key with spaces or dashes doesn't work
Use bracket notation: $['first-name'] or $.user['home address'] instead of dot notation.
Filter returns nothing
Filters run on array items. Put [?(...)] directly on the array and reference the item with @, e.g. $.items[?(@.qty > 0)].
Results are wrapped in an array
JSONPath always returns a list of matches, even for a single value. Take the first item if you expect exactly one result.

Explore More Developer Tools

Format, Validate, and Generate Data Instantly

TrueFormatter provides essential utilities for modern web development, including JSON formatting, YAML conversion, and more.

JSON Auto-Fixer & Formatter

Repair, validate, and beautify broken JSON (missing quotes, trailing commas).

JSON Validator & Linter

Check JSON syntax and see the exact line and column of every error.

JSON Beautifier

Pretty-print and indent JSON for easy reading and debugging.

JSON Compare & Diff Tool

Find the difference between two JSON objects visually and quickly.

JSONPath Tester

Evaluate JSONPath expressions with filters and recursive queries.

JSON Schema Generator

Generate a JSON Schema from any sample JSON document.

JSON to CSV Converter

Flatten nested JSON arrays into CSV for spreadsheets.

YAML ⇆ JSON Converter

Convert YAML to JSON or JSON to YAML instantly.

CSV to JSON Converter

Convert CSV or TSV data to a JSON array of objects, with type detection.

JSON to TypeScript

Generate TypeScript interfaces from any JSON sample.

JWT Decoder

Decode and inspect JSON Web Tokens (JWT) Header and Payload.

JWT Generator

Create and sign HS256/HS384/HS512 JSON Web Tokens for testing.

Hash Generator (MD5, SHA)

Generate MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes.

Password Generator

Generate strong, random passwords with the length and characters you choose.

Base64 Encoder ⇆ Decoder

Encode text to Base64 and decode Base64 to text for API debugging.

URL Encoder & Decoder

Cleanly encode special characters in URLs and decode query strings.

SQL Formatter & Beautifier

Format SQL queries for MySQL, PostgreSQL, SQL Server, SQLite and more.

CSS Minifier & Compressor

Optimize CSS by removing whitespace and comments to accelerate page load time.

JS Minifier & Compressor

Compress JavaScript to improve website speed and performance.

HTML Formatter & Beautifier

Beautify or minify HTML with clean, consistent indentation.

Markdown Editor & Preview

Write Markdown with a live preview and copy the HTML.

Word & Character Counter

Count words, characters, sentences and reading time as you type.

Case Converter

Convert text to camelCase, snake_case, kebab-case, Title Case and more.

Text Diff & Compare

Compare two texts and highlight every added and removed word or line.

Lorem Ipsum Generator

Generate placeholder paragraphs, sentences or words as text or HTML.

Fancy Text & Font Generator

Turn text into 𝐛𝐨𝐥𝐝, 𝘪𝘵𝘢𝘭𝘪𝘤, 𝓈𝒸𝓇𝒾𝓅𝓉 and other Unicode font styles you can paste anywhere.

Color Picker & Converter

Pick a color and convert between HEX, RGB and HSL instantly.

Color Palette Generator

Generate harmonious color palettes and export them as CSS, Tailwind or JSON.

CSS Gradient Generator

Build linear and radial CSS gradients visually and copy the code.

PX to REM Converter

Convert pixels to rem and rem to pixels for any root font size.

Regex Tester & Debugger

Test JavaScript regular expressions with live match highlighting and groups.

Cron Expression Generator

Build cron schedules, read them in plain English and preview next runs.

UUID / GUID Generator

Generate unique V4 UUIDs for database keys or testing.

Epoch converter online

Convert UNIX timestamps to human-readable dates and back instantly.

Time Zone Converter

Convert a time between time zones and compare cities side by side.

Random Number Generator

Generate random numbers in any range — unique, sorted or decimals.

Crop Image Online

Crop images exactly as selected with fixed aspect ratios. No upload, no resize, no quality loss.

Compress Image Online

Compress JPG, PNG & WebP images directly in your browser. No upload, no tracking, instant download.

Image Resizer

Resize images to exact pixels or a percentage, keeping the aspect ratio.

Image Converter (PNG, JPG, WebP)

Convert images between PNG, JPG and WebP in your browser.

Image to Base64

Convert an image to a Base64 data URI for CSS, HTML or JSON.

JSONPath Tester FAQ

JSONPath is a query language for JSON, similar to XPath for XML. It allows you to extract specific values from deeply nested JSON structures using expressions like $.store.book[*].author.

No. All processing happens locally in your browser. Your JSON is never uploaded, stored, or sent to any server.

This tool supports common JSONPath features such as root ($), dot and bracket notation, wildcards (*), array indexes, filters like [?(@.price < 10)], and recursive descent using (..).

An empty array means the JSONPath expression did not match any value in the input JSON. Try starting with a simpler path like $.store and then refine your expression.

Yes. Enable the “Show single value” option. When the JSONPath result contains exactly one match, the tool will display the value directly instead of wrapping it in an array.

You can use the “Copy Output” button to copy the result to your clipboard, or the “Download” option to save the result as a .json file.