Runtime verified Differs from official docs Test scripts included

Formats a number as a currency value for a locale.

Syntax

{{formatCurrency number [cultureCode]}}

Returns string.

Parameters

Name Type Required Description
number number Yes The number to format as currency.
cultureCode string No Locale code. Defaults to en_US.

Example

Tested in a Marketing Cloud Next email on 2026-11-22:

  • {{formatCurrency 1234.56 "en-US"}} renders $1,234.56, as documented.
  • {{formatCurrency 1234.56 "de-DE"}} renders 1.234,56 €. The documented result is 1.234,56 € (the space before € is a non-breaking space in the output).
  • {{formatCurrency 1234.56 "ja-JP"}} renders ¥1,235, as documented.
Show Next test script
<!-- Marketing Cloud Next test script for the formatCurrency helper. Paste it into the HTML component of a
     Next email and open the preview. Each line prints the result Next gave when the call
     was rendered on its own (expect) next to the result of this run (got).
     Assembled from single-call test emails (dates on the page); it has not been
     run as one email. Calls that make Next fail are listed separately. -->
<p>c1 expect=[$1,234.56] got=[{{formatCurrency 1234.56 "en-US"}}]</p>
<p>c2 expect=[1.234,56 €] got=[{{formatCurrency 1234.56 "de-DE"}}]</p>
<p>c3 expect=[¥1,235] got=[{{formatCurrency 1234.56 "ja-JP"}}]</p>

Differs from official docs

  • The reference shows the de-DE result as 1.234,56 € with an ordinary space before the euro sign. In Marketing Cloud Next (tested 2026-11-22): {{formatCurrency 1234.56 "de-DE"}} rendered 1.234,56 € with a non-breaking space (U+00A0) before €. It looks identical, but a plain text comparison against the documented value fails. en-US and ja-JP matched the docs. Details

Marketing Cloud Next

See also