Format a number with grouped thousands and decimals:

number_format

{{"number"|number_format:2:",":"."}}

Arguments

ArgumentDescription
1

Sets the number of decimal digits. If 0, the decimal_separator is omitted from the return value.

2Sets the separator for the decimal point.
3

Sets the thousands separator.

Examples

number_format examples

{{"1203"|number_format}} 1,203
{{"1203"|number_format:"2":",":"."}} 1.203,00
{{"1203"|number_format:"2":",":"."}} 1.203

{{"23598.12"|number_format:"0":",":"."}} 23.598 
{{"23598.12"|number_format:"1":",":"."}} 23.598,1
{{"23598.12"|number_format:"2":",":"."}} 23.598,12

{{"23598,12"|replace:",":"."|number_format:"2":",":"."}} 23.598,12