---
title: "Format.urlencode ViewHelper <f:format.urlencode>"
manual: "Fluid Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/fluid:typo3fluid-fluid-format-urlencode"
source: "ViewHelpers/Fluid/Format/Urlencode.rst"
rendered: "2026-09-26T08:24:58+00:00"
---

# Format.urlencode ViewHelper `<f:format.urlencode>` {#typo3fluid-fluid-format-urlencode}

> [!NOTE]
> This reference is part of the documentation of Fluid Standalone.
> If you are working with Fluid in TYPO3 CMS, please refer to
> [TYPO3's ViewHelper reference](https://docs.typo3.org/other/typo3/view-helper-reference/14.3/en-us/Global/Format/Urlencode.html) instead.

Encodes the given string according to [http://www.faqs.org/rfcs/rfc3986.html](http://www.faqs.org/rfcs/rfc3986.html)
Applying PHPs `rawurlencode()` function.
See [https://www.php.net/manual/function.rawurlencode.php](https://www.php.net/manual/function.rawurlencode.php).

> [!NOTE]
> The output is not escaped. You may have to ensure proper escaping on your own.

## Examples {#examples}

### Default notation {#default-notation}

```php
<f:format.urlencode>foo @+%/</f:format.urlencode>

```

`foo%20%40%2B%25%2F` `rawurlencode()` applied.

### Inline notation {#inline-notation}

```php
{text -> f:format.urlencode()}

```

Url encoded text `rawurlencode()` applied.

Go to the source code of this ViewHelper: [Format\\UrlencodeViewHelper.php (GitHub)](https://github.com/TYPO3/Fluid/blob/main/src/ViewHelpers/Format/UrlencodeViewHelper.php).

**Arguments**

The following arguments are available for the format.urlencode ViewHelper:

-   **value**

    -   *Type:* string

    string to format
