---
title: "JSON Extractor"
description: "Configure the JMeter JSON Extractor post-processors: properties, defaults, and practical usage notes for building reliable load tests."
url: https://docs.jmeter.ai/components/json-extractor/
lastUpdated: 2026-10-01
source: docs.jmeter.ai
---

# JSON Extractor

*Part of the **Post-Processors** category. Also documented in context in the [full Component Reference](/user-manual/component-reference/#json-extractor).*

**TL;DR:** the JSON Extractor pulls a value out of a JSON response using JSONPath, so a later request can reuse it (auth tokens, IDs, pagination cursors). It’s the modern replacement for regex-scraping JSON bodies.

The JSON PostProcessor enables you extract data from JSON responses using JSON-PATH syntax. This post processor is very similar to Regular expression extractor.
It must be placed as a child of HTTP Sampler or any other sampler that has responses.
It will allow you to extract in a very easy way text content, see [JSON Path syntax](https://github.com/json-path/JsonPath).

| Name | Required | Description |
| --- | --- | --- |
| Name | No | Descriptive name for this element that is shown in the tree. |
| Apply to: | Yes | This is for use with samplers that can generate sub-samples,         e.g. HTTP Sampler with embedded resources, Mail Reader or samples generated by the Transaction Controller.          **`Main sample only`** : only applies to the main sample **`Sub-samples only`** : only applies to the sub-samples **`Main sample and sub-samples`** : applies to both. **`JMeter Variable Name to use`** : extraction is to be applied to the contents of the named variable |
| Names of created variables | Yes | Semicolon separated names of variables that will contain the results of JSON-PATH expressions (must match number of JSON-PATH expressions) |
| JSON Path Expressions | Yes | Semicolon separated JSON-PATH expressions (must match number of variables) |
| Default Values | No | Semicolon separated default values if JSON-PATH expressions do not return any result(must match number of variables) |
| Match Numbers | No | For each JSON Path Expression, if the JSON Path query leads to many results, you can choose which one(s) to extract as Variables:      - `0`: means random (Default Value) - `-1` means extract all results, they will be named as `_&lt;variable name&gt;__N` (where `N` goes from 1 to Number of results) - `X`: means extract the _X_th result. If this _X_th is greater than number of matches, then nothing is returned. Default value will be used     The numbers have to be given as a Semicolon separated list. The number of elements in that list have to match the number of given JSON Path Expressions. If left empty, the value `0` will be used as default for every expression. |
| Compute concatenation var | No | If many results are found, plugin will concatenate them using ‘`,`’ separator and store it in a var named `_&lt;variable name&gt;__ALL` |

![JSON PostProcessor](/images/screenshots/json-post-processor.png)

*JSON PostProcessor*

### Common gotchas

- Set a **Default Value** (e.g. `NOT_FOUND`) for every extraction. Without one, a failed match silently leaves the variable unset instead of failing loudly — see the [Extractor Default Value playbook](/topics/errors/extractor-not-found-default-value/).
- **Match No.** `0` means “random match”; use `-1` to capture every match into `var_1`, `var_2`, … and `var_matchNr` for the count.
- JSONPath here is Jayway JsonPath syntax (`$.data.items[0].id`), not the same dialect as some online JSONPath testers — verify against actual JMeter behavior before assuming a path is wrong.
- For deeply nested or highly dynamic payloads, a [JSR223 PostProcessor](/components/jsr223-postprocessor/) with a JSON library is sometimes more maintainable than a long JSONPath expression.

## Related

- [Correlation & Dynamic Values](/topics/correlation-dynamic-values/)
- [Regex Extractor Builder](/tools/regex-tester/)
- [Extractor Default Value (NOT_FOUND)](/topics/errors/extractor-not-found-default-value/)
- [Full Component Reference](/user-manual/component-reference/)
- [Functions and Variables](/user-manual/functions/)
