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

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

> [!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/Number.html) instead.

Formats a number with custom precision, decimal point and grouped thousands.
See [https://www.php.net/manual/function.number-format.php](https://www.php.net/manual/function.number-format.php).

## Examples {#examples}

### Defaults {#defaults}

```php
<f:format.number>423423.234</f:format.number>

```

`423,423.20`

### With all parameters {#with-all-parameters}

```php
<f:format.number decimals="1" decimalSeparator="," thousandsSeparator=".">
    423423.234
</f:format.number>

```

`423.423,2`

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

**Arguments**

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

-   **decimalSeparator**

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

    The decimal point character

-   **decimals**

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

    The number of digits after the decimal point

-   **thousandsSeparator**

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

    The character for grouping the thousand digits
