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

# __urlencode

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

Function to encode a string to a `application/x-www-form-urlencoded` string.

For example, the string

```bash
\${__urlencode(Word "school" is "école" in french)}
```

returns
`Word+%22school%22+is+%22%C3%A9cole%22+in+french`.

Uses Java class [URLEncoder](http://docs.oracle.com/javase/7/docs/api/java/net/URLEncoder.html).

| Name | Required | Description |
| --- | --- | --- |
| String to encode | Yes | String to encode in URL encoded chars. |

## 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/)
