Intl.NumberFormat Currency

MDN Link for Intl.NumberFormat

Browser Support

Input values

Alternative use

Intl.NumberFormat can also be used from Number.prototype.toLocaleString() const numberToFormat = 123456.789;
const formatted = numberToFormat.toLocaleString("en-US" );
// €123,456.79

Output

currencySign

{ currencySign: "standard" , style: "currency" , currency: "EUR" , }
// €123,456.79
{ currencySign: "accounting" , style: "currency" , currency: "EUR" , }
// €123,456.79

currencyDisplay

{ currencyDisplay: "code" , style: "currency" , currency: "EUR" , }
// EUR 123,456.79
{ currencyDisplay: "symbol" , style: "currency" , currency: "EUR" , }
// €123,456.79
{ currencyDisplay: "narrowSymbol" , style: "currency" , currency: "EUR" , }
// €123,456.79
{ currencyDisplay: "name" , style: "currency" , currency: "EUR" , }
// 123,456.79 euros

signDisplay

{ signDisplay: "auto" , style: "currency" , currency: "EUR" , }
// €123,456.79
{ signDisplay: "never" , style: "currency" , currency: "EUR" , }
// €123,456.79
{ signDisplay: "always" , style: "currency" , currency: "EUR" , }
// +€123,456.79
{ signDisplay: "exceptZero" , style: "currency" , currency: "EUR" , }
// +€123,456.79

useGrouping

{ useGrouping: true , style: "currency" , currency: "EUR" , }
// €123,456.79
{ useGrouping: false , style: "currency" , currency: "EUR" , }
// €123456.79

minimumIntegerDigits

{ minimumIntegerDigits: 1 , style: "currency" , currency: "EUR" , }
// €123,456.79
{ minimumIntegerDigits: 2 , style: "currency" , currency: "EUR" , }
// €123,456.79
{ minimumIntegerDigits: 3 , style: "currency" , currency: "EUR" , }
// €123,456.79
{ minimumIntegerDigits: 4 , style: "currency" , currency: "EUR" , }
// €123,456.79
{ minimumIntegerDigits: 5 , style: "currency" , currency: "EUR" , }
// €123,456.79

minimumFractionDigits

{ minimumFractionDigits: 1 , style: "currency" , currency: "EUR" , }
// €123,456.79
{ minimumFractionDigits: 2 , style: "currency" , currency: "EUR" , }
// €123,456.79
{ minimumFractionDigits: 3 , style: "currency" , currency: "EUR" , }
// €123,456.789
{ minimumFractionDigits: 4 , style: "currency" , currency: "EUR" , }
// €123,456.7890
{ minimumFractionDigits: 5 , style: "currency" , currency: "EUR" , }
// €123,456.78900

maximumFractionDigits

{ maximumFractionDigits: 1 , style: "currency" , currency: "EUR" , }
// €123,456.8
{ maximumFractionDigits: 2 , style: "currency" , currency: "EUR" , }
// €123,456.79
{ maximumFractionDigits: 3 , style: "currency" , currency: "EUR" , }
// €123,456.789
{ maximumFractionDigits: 4 , style: "currency" , currency: "EUR" , }
// €123,456.789
{ maximumFractionDigits: 5 , style: "currency" , currency: "EUR" , }
// €123,456.789

minimumSignificantDigits

{ minimumSignificantDigits: 1 , style: "currency" , currency: "EUR" , }
// €123,456.789
{ minimumSignificantDigits: 2 , style: "currency" , currency: "EUR" , }
// €123,456.789
{ minimumSignificantDigits: 3 , style: "currency" , currency: "EUR" , }
// €123,456.789
{ minimumSignificantDigits: 4 , style: "currency" , currency: "EUR" , }
// €123,456.789
{ minimumSignificantDigits: 5 , style: "currency" , currency: "EUR" , }
// €123,456.789

maximumSignificantDigits

{ maximumSignificantDigits: 1 , style: "currency" , currency: "EUR" , }
// €100,000
{ maximumSignificantDigits: 2 , style: "currency" , currency: "EUR" , }
// €120,000
{ maximumSignificantDigits: 3 , style: "currency" , currency: "EUR" , }
// €123,000
{ maximumSignificantDigits: 4 , style: "currency" , currency: "EUR" , }
// €123,500
{ maximumSignificantDigits: 5 , style: "currency" , currency: "EUR" , }
// €123,460

localeMatcher

{ localeMatcher: "best fit" , style: "currency" , currency: "EUR" , }
// €123,456.79
{ localeMatcher: "lookup" , style: "currency" , currency: "EUR" , }
// €123,456.79