JSONPath テスター

JSONPath 式を JSON に対して試験

JSON Data

Loading editor...

Results

Loading editor...

Pull exactly what you need out of huge payloads

When a JSON document is hundreds or thousands of lines, scrolling to find a value isn't a strategy. JSONPath gives you an XPath-style query language for JSON: dot paths, array indexes, recursive descent, and filter expressions you can iterate on live until the result matches what you need.

Use the tester when you need to

Extract specific values from a response

Run expressions like $.users[?(@.active==true)].email to select exactly the fields that matter.

Debug a JSONPath query before shipping

Iterate on the expression in the browser until the matches look right, then paste it into your code.

Audit large or deeply nested documents

Use $..key to find every occurrence of a field anywhere in the tree, no matter how deep.

How to test a JSONPath expression

  1. 1

    Paste your JSON data into the editor.

  2. 2

    Type a JSONPath expression in the query field.

  3. 3

    Review the matches and refine the expression until the result is exactly what you need.

Common JSONPath workflows

Debug a query in production code

Recreate the query against a real response and tweak it until the matches are correct.

Build an alert on nested data

Find all values matching a condition deep in a payload and decide whether to alert or page.

Pull specific fields from large API responses

Avoid loading the whole document into your app — extract only what you need at the boundary.

関連ツール

よくある質問

JSONPath は JSON 用のクエリ言語で、XML に対する XPath のようなものです。$.store.book[0].title のような式で特定の値を選択・抽出できます。$..price は「どの深さでも price をすべて取得」の意味です。

$ はルート、.key は子要素、[0] は配列インデックス、[*] は全要素、.. は再帰的に任意の深さ、[?(@.price < 10)] は条件でフィルタです。例: $.users[?(@.active==true)].name は active なユーザーの name を取得します。

JSON データをエディタに貼り付け、クエリ欄に JSONPath 式を入力して Execute をクリックします。マッチした結果が即座に表示され、値だけでなくドキュメント内のフルパスも確認できます。

JSONPath はドット記法(例: $.store.book[0])を使い、jq はパイプ構文(例: .store.book[0])を使います。JSONPath は主に JavaScript/Java 系のエコシステムで使われ、jq はシェルスクリプトで人気のコマンドラインツールです。どちらも JSON をクエリできます。