---
title: "Format.currency ViewHelper <f:format.currency>"
manual: "Fluid ViewHelper Reference"
version: "13.4"
permalink: "https://docs.typo3.org/permalink/t3viewhelper:typo3-fluid-format-currency@13.4"
source: "Global/Format/Currency.rst"
modified: "2026-09-17T09:07:45+00:00"
---

# Format.currency ViewHelper `<f:format.currency>`

ViewHelper which formats a given float to a currency representation.

Go to the source code of this ViewHelper: [Format\\CurrencyViewHelper.php (GitHub)](https://github.com/TYPO3/typo3/blob/main/typo3/sysext/fluid/Classes/ViewHelpers/Format/CurrencyViewHelper.php).

**Table of contents**

-   [Examples](https://docs.typo3.org/permalink/t3viewhelper:examples@13.4)
-   [Arguments of the <f:format.currency> ViewHelper](https://docs.typo3.org/permalink/t3viewhelper:arguments-of-the-f-format-currency-viewhelper@13.4)

## Examples

### Defaults

**packages/my_extension/Resources/Private/Templates/Content/Text.fluid.html**

```html
<f:format.currency>123.456</f:format.currency>
```

**Output**

```text
123,46
```

### All parameters

**packages/my_extension/Resources/Private/Templates/Content/Text.fluid.html**

```html
<f:format.currency decimalSeparator="." thousandsSeparator="," decimals="2"
  currencySign="$" prependCurrency="true" separateCurrency="false"
>
  54321
</f:format.currency>
```

**Output**

```text
$54,321.00
```

### Inline notation

**packages/my_extension/Resources/Private/Templates/Content/Text.fluid.html**

```html
{someNumber -> f:format.currency(thousandsSeparator: ',', currencySign: 'EUR')}
```

**Output**

```text
54,321,00 EUR
```

Depending on the value of `{someNumber}`.

### Use dash for decimals without value

**packages/my_extension/Resources/Private/Templates/Content/Text.fluid.html**

```html
<f:format.currency useDash="true">123.00</f:format.currency>
```

**Output**

```text
123,-
```

## Arguments of the `<f:format.currency>` ViewHelper

-   **currencySign**

    -   *Type:* string
    -   *Default:* ''

    The currency sign, eg $ or €.

-   **decimalSeparator**

    -   *Type:* string
    -   *Default:* ','

    The separator for the decimal point.

-   **decimals**

    -   *Type:* int
    -   *Default:* 2

    Set decimals places.

-   **prependCurrency**

    -   *Type:* bool
    -   *Default:* false

    Select if the currency sign should be prepended

-   **separateCurrency**

    -   *Type:* bool
    -   *Default:* true

    Separate the currency sign from the number by a single space, defaults to true due to backwards compatibility

-   **thousandsSeparator**

    -   *Type:* string
    -   *Default:* '.'

    The thousands separator.

-   **useDash**

    -   *Type:* bool
    -   *Default:* false

    Use the dash instead of decimal 00
