Favorites

JavaScript Intl.NumberFormat Object

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee
Intl.NumberFormat
JavaScript Internationalization · ConstructorThis object is supported by all modern browsers.
Updated 28th November 2026

Intl.NumberFormat formats numbers for a language and region, including currencies, percentages, units and compact forms like 1.2K.

Description

Intl.NumberFormat creates a formatter for numbers that uses the right digits, decimal separator and grouping for a locale. The style option can be 'decimal', 'currency' (with a currency code such as 'EUR'), 'percent' or 'unit' (with a unit such as 'kilometer-per-hour'). notation: 'compact' gives short forms such as "1.2K", and minimumFractionDigits and maximumFractionDigits control rounding.

Reuse one formatter for many numbers rather than calling toLocaleString() repeatedly with the same options.

formatToParts() returns the formatted number split into labelled pieces, such as the integer, decimal separator, fraction and currency symbol, so you can style them separately. formatRange() formats ranges like "$3 – $5" correctly for the locale. The signDisplay option controls whether plus signs appear, and roundingMode and roundingIncrement give fine control over rounding, such as rounding prices to the nearest 5 cents.

Creating

new Intl.NumberFormat(locales, options)

Example

const n = 1234567.891;
console.log(new Intl.NumberFormat('en-US').format(n));
console.log(new Intl.NumberFormat('de-DE').format(n));
console.log(new Intl.NumberFormat('en-AU', { style: 'currency', currency: 'AUD' }).format(49.9));
console.log(new Intl.NumberFormat('en', { style: 'percent' }).format(0.256));
console.log(new Intl.NumberFormat('en', { notation: 'compact' }).format(n));
console.log(new Intl.NumberFormat('en', { style: 'unit', unit: 'kilometer-per-hour' }).format(60));

Browser Support

The following information will show you the current browser support for the Intl.NumberFormat object. Hover over a browser icon to see the version that first introduced support for this object.

This object is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee