Toolvito

Calculates on this device. File exports run online.

JSON Query Tester

Paste JSON and try a query on it: JSONPath as standardised in RFC 9535, JMESPath, or a JSON Pointer. You see every result with its path. You can also list the path of every value in four notations, apply or make a JSON Patch or merge patch, and write SQL Server queries that make JSON from a table (FOR JSON PATH) or a table from JSON (OPENJSON). Everything runs in your browser.

Enter your values

JSONPath, JMESPath or JSON Pointer on your JSON, with every result and its path.

Your values

JSONPath: $.store.book[0].title, $..price, $.store.book[?@.price < 10]. JMESPath: store.book[?price < `10`].title. Pointer: /store/book/0/title.

This is off unless you turn it on. Saved entries stay in this browser only. Untick the box to delete them.

Your values are worked out in this browser. They are not sent to a server.

Your result will show here

Fill in the values, then choose the button below them.

Run the query on a large file

Run the query on a large file

Choose a JSON file of up to 1 GB. The JSONPath or JMESPath query of Run a query above is used: press Run the query there first.

Or drop files here. CSV, TSV, TAB, TXT, JSON, JSONL, NDJSON, PARQUET, XLSX, XML, YAML, YML, TOML, PLIST, GED, XSD or DTD, up to 20 files, 1 GB each at most.

    More options

    Queries above run in your browser. When you use this box, the file you choose and the query are sent to the Toolvito server. Download the result within one hour after the job finishes. Choose Delete files now to request earlier removal. The hourly cleanup normally removes files within one to two hours after completion.

    How to use it

    1. Choose Run a query, paste your JSON (or open a .json file), choose the language and type the query, then press Run the query.
    2. To find the path of a value you see, choose List every path: copy it in the notation you need.
    3. For changes, choose JSON Patch and merge patch. For SQL Server, choose SQL Server JSON.

    Query languages

    • JSONPath (RFC 9535): $ is the document; .name or ['name'], [0], [-1], [1:3], * and .. (all levels); filters such as [?@.price < 10], with &&, ||, !, and the functions length(), count(), match(), search() and value().
    • JMESPath: store.book[0].title, projections such as store.book[*].title, filters such as store.book[?price < 10], pipes |, multi-select lists and hashes, and functions such as sort_by(), max_by(), join() and length().
    • JSON Pointer (RFC 6901): /store/book/0/title, with ~1 for / and ~0 for ~ inside a name.

    SQL Server

    • FOR JSON PATH: each row becomes an object, and a column alias with dots, such as [address.city], becomes a nested object. Columns that are NULL are left out unless INCLUDE_NULL_VALUES is set. The columns of one nested object must stand next to each other, or SQL Server stops with error 13601.
    • OPENJSON … WITH reads a JSON list as a table; JSON_VALUE and JSON_QUERY read one value with a path such as $.store.bicycle.color.

    Large files

    The box below runs your JSONPath or JMESPath query on a JSON file of up to 1 GB on the server. Its JSONPath reader follows the classic style: names, wildcards, indexes, slices and .. work as above, but filters are written as [?(@.price < 10)] and functions are not the same.

    Related tools