Skip to main content
CuteJSON
↑↓ Navigate Enter Select Esc Close

JSONPath Tester

Write a query, see exactly what it matches, and find out precisely where a query with no results went wrong.

Back to all tools

Keyboard shortcuts

These work wherever the matching action exists on this page.

Open the command palette
Ctrl/Cmd + K
Run the main action
Ctrl/Cmd + Enter
Format
Ctrl/Cmd + Shift + F
Minify
Ctrl/Cmd + Shift + M
Copy output
Ctrl/Cmd + Shift + C
Open file
Ctrl/Cmd + Shift + O
Download output
Ctrl/Cmd + S
Close this dialog
Esc
Open this dialog
F1 / ?

Local data

Everything below is stored only in this browser, on this device. None of it is ever sent anywhere, and closing this dialog is not required for that to stay true.

Unsaved drafts
Tools with remembered options

Recently opened files

    No files opened yet on this device.

    Share via link

    The content is packed into the part of the link after the # sign, which browsers never send to a server. Nothing here is uploaded to cutejson.com or anywhere else.

    Shares the first input on this page. On a tool with more than one, only that one is included.

    Nothing to share yet. Paste or type something first.

    Examples

    Input

    Load from a URL

    Fetches the URL directly from your browser and loads whatever text it returns into this pane.

    Matches

    Matches appear here.

    Runs entirely in your browser. Nothing you paste is uploaded, and you can confirm that in your browser Network tab.

    About this tool

    This implements the part of RFC 9535 that real queries use, and says so rather than claiming the whole specification and failing on an edge case. Names, wildcards, indexes including negative ones, slices with a step, unions inside one bracket, descendant segments and filters are all supported. Filters compare a relative path against a number, a string, true, false or null, combine with and, or and not, and test for a key simply by naming it. What is not supported is named on the page and reported by name when you use it: function extensions such as length, absolute paths inside a filter, and comparisons between two paths. Matching runs over the token stream, so every result carries its own path, its line, and the value exactly as you wrote it.

    How to use

    1. Paste your JSON into the editor, or load the sample.
    2. Type a query, or press one of the examples. Results update as soon as you stop typing.
    3. Select a match to highlight it in the editor, and read the count above to confirm the query did what you meant.

    Supported syntax

    $ The whole document
    $.store.book A child by name
    $['a name'] A name that has a space or punctuation in it
    $.store.* Every child of a value
    $.book[0], $.book[-1] An element by position, counting back from the end with a minus
    $.book[1:4], $.book[::2] A range of elements, with an optional step
    $.book[0, 2], $['a', 'b'] Several selectors at once
    $..price The same selector at every depth
    $.book[?@.price < 10] Only the values that pass a test
    $.book[?@.isbn] Only the values that have a given key

    Keep reading

    JSONPath cheat sheet, with worked examples Read the guide