Number (decimal / float) — formatted
Fill in your field nameItalic values are placeholders: replace them with your own machine names, or let the builder do it.
Raw entity
Open in builder (Raw entity)Reads the entity directly, before field formatters run.
- Twig
{{ node.field_name. value| number_format( 2, ',', '.') }}
Render array
Open in builder (Render array)Reads the content render array, after field formatters run.
- Twig
{{ content.field_name }}
Gotcha
The render array uses the formatter’s thousand and decimal separators; number_format takes decimals, decimal point and thousands separator.