---
title: "Replace ViewHelper <f:replace>"
manual: "Fluid ViewHelper Reference"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3viewhelper:typo3fluid-fluid-replace@main"
source: "Global/Replace.rst"
rendered: "2026-09-25T05:46:13+00:00"
---

# Replace ViewHelper `<f:replace>` {#typo3fluid-fluid-replace}

The ReplaceViewHelper replaces one or multiple strings with other
strings. This ViewHelper mimicks PHP's `str_replace()` function.
However, it's also possible to provide replace pairs as associative array
via the "replace" argument.

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

## Arguments of the `<f:replace>` ViewHelper {#typo3fluid-fluid-replace-arguments}

-   **replace**

    -   *Type:* mixed
    -   *Required:* true

-   **search**

    -   *Type:* mixed

-   **value**

    -   *Type:* string
