# format\_integer

Source: https://zotonic.com/docs/1741/format_integer

URI: https://zotonic.com/id/1741

Language: en



Show an integer value.

Formats an integer value as a list, assuming a radix of ten.

For example:

```django
{{ value|format_integer }}
```

When the value is the integer 123 then the output is the list `123`.

The format\_integer filter has an optional argument to pad the returned string with zeros to a fixed length. For example:

```django
{{ 123|format_integer:5 }}
```

Will output `00123`. And when the number does not fit:

```django
{{ 123|format_integer:2 }}
```

Will output “\*\*”.

::: {.note title="Note"}
This option only works for positive integers.
:::

License: 

Attribution: 

Related resources: https://zotonic.com/api/agent/related/1741?language=en


## API access

- [API help](<https://zotonic.com/api-help>)
- [OpenAPI specification](<https://zotonic.com/openapi.json>)
- [This resource as JSON](<https://zotonic.com/api/agent/resource/1741?language=en>)
