Loading tool...
Loading tool...
Explore Intl.NumberFormat — format numbers with currency, units, compact notation, and any locale.
const formatter = new Intl.NumberFormat("en-US", {
"notation": "standard",
"signDisplay": "auto",
"useGrouping": true,
"minimumFractionDigits": 0,
"maximumFractionDigits": 3,
"style": "decimal"
});
console.log(formatter.format(1234567.89));| Locale | Result |
|---|---|
| en-USEnglish (US) | 1,234,567.89 |
| de-DEGerman (Germany) | 1.234.567,89 |
| fr-FRFrench (France) | 1 234 567,89 |
| ja-JPJapanese (Japan) | 1,234,567.89 |
| ar-SAArabic (Saudi Arabia) | ١٬٢٣٤٬٥٦٧٫٨٩ |
| hi-INHindi (India) | 12,34,567.89 |