---
title: "__split"
description: "JMeter __split function reference: syntax, parameters, and practical examples for parameterizing test plans with dynamic values."
url: https://docs.jmeter.ai/functions/split/
lastUpdated: 2026-10-01
source: docs.jmeter.ai
---

# __split

*Also documented in context in the [full Functions and Variables reference](/user-manual/functions/#__split).*

The split function splits the string passed to it according to the delimiter,
and returns the original string. If any delimiters are adjacent, “`?`” is returned as the value.
The split strings are returned in the variables `\${VAR_1}`, `\${VAR_2}` etc.
The count of variables is returned in `\${VAR_n}`.
A trailing delimiter is treated as a missing variable, and “`?`” is returned.
Also, to allow it to work better with the ForEach controller,
`__split` now deletes the first unused variable in case it was set by a previous split.

Example:

Define `VAR`=“`a||c|`” in the test plan.

```bash
\${__split(\${VAR},VAR,|)}
```

This will return the contents of `VAR`, i.e. “`a||c|`” and set the following variables:

`VAR_n`=`4`

`VAR_1`=`a`

`VAR_2`=`?`

`VAR_3`=`c`

`VAR_4`=`?`

`VAR_5`=`null`

| Name | Required | Description |
| --- | --- | --- |
| String to split | Yes | A delimited string, e.g. “`a |
| Name of variable | Yes | A reference name for reusing the value                computed by this function. |
| Delimiter | No | The delimiter character, e.g. ` |

## Related

- [Functions and Variables Guide](/topics/functions-and-variables/)
- [Regex Extractor Builder](/tools/regex-tester/)
- [Full Functions Reference](/user-manual/functions/)
- [Component Reference](/user-manual/component-reference/)
