Settings

Code Theme

Theme for code blocks: OceanicNext/Github

Theme

Page theme

Toggle to hide or show Browser Details/Support

Change the color of the accent (default: purple)

Language for page. Press Confirm to reload page with selected language

Confirm language

Intl.NumberFormat

Browser support

Full support

Available in Chrome from version 24 Chrome
Available in Edge from version 12 Edge
Available in Firefox from version 29 Firefox
Available in Opera from version 15 Opera
Available in Safari from version 10 Safari
Available in Chrome Android from version 25 Chrome Android
Available in Firefox for Android from version 56 Firefox for Android
Available in Opera Android from version 14 Opera Android
Available in Safari on iOS from version 10 Safari on iOS
Available in Samsung Internet from version 1.5 Samsung Internet
Available in WebView Android from version 4.4 WebView Android
Available in WebView on iOS from version 10 WebView on iOS
Available in Deno from version 1.8 Deno
Available in Node.js from version 0.12.0 Node.js

See also Currency and Unit.

Input


Alternativ use

Intl.NumberFormat can also be used from Number.prototype.toLocaleString()
const number = 123456.789
number.toLocaleString(undefined)
123,456.789

Output


unitDisplay

Browser support

Available in Chrome from version 77 Chrome
Available in Edge from version 79 Edge
Available in Firefox from version 78 Firefox
Available in Opera from version 64 Opera
Available in Safari from version 14.1 Safari
Available in Chrome Android from version 77 Chrome Android
Available in Firefox for Android from version 79 Firefox for Android
Available in Opera Android from version 55 Opera Android
Available in Safari on iOS from version 14.5 Safari on iOS
Available in Samsung Internet from version 12.0 Samsung Internet
Available in WebView Android from version 77 WebView Android
Available in WebView on iOS from version 14.5 WebView on iOS
Available in Deno from version 1.8 Deno
Available in Node.js from version 12.11.0 Node.js
{
unitDisplay: "long"
}
123,456.789
{
unitDisplay: "short"
}
123,456.789
{
unitDisplay: "narrow"
}
123,456.789

compactDisplay

Browser support

Available in Chrome from version 77 Chrome
Available in Edge from version 79 Edge
Available in Firefox from version 78 Firefox
Available in Opera from version 64 Opera
Available in Safari from version 14.1 Safari
Available in Chrome Android from version 77 Chrome Android
Available in Firefox for Android from version 79 Firefox for Android
Available in Opera Android from version 55 Opera Android
Available in Safari on iOS from version 14.5 Safari on iOS
Available in Samsung Internet from version 12.0 Samsung Internet
Available in WebView Android from version 77 WebView Android
Available in WebView on iOS from version 14.5 WebView on iOS
Available in Deno from version 1.8 Deno
Available in Node.js from version 12.11.0 Node.js
{
compactDisplay: "short"
}
123,456.789
{
compactDisplay: "long"
}
123,456.789

notation

Browser support

Available in Chrome from version 77 Chrome
Available in Edge from version 79 Edge
Available in Firefox from version 78 Firefox
Available in Opera from version 64 Opera
Available in Safari from version 14.1 Safari
Available in Chrome Android from version 77 Chrome Android
Available in Firefox for Android from version 79 Firefox for Android
Available in Opera Android from version 55 Opera Android
Available in Safari on iOS from version 14.5 Safari on iOS
Available in Samsung Internet from version 12.0 Samsung Internet
Available in WebView Android from version 77 WebView Android
Available in WebView on iOS from version 14.5 WebView on iOS
Available in Deno from version 1.8 Deno
Available in Node.js from version 12.11.0 Node.js
{
notation: "standard"
}
123,456.789
{
notation: "scientific"
}
1.235E5
{
notation: "engineering"
}
123.457E3
{
notation: "compact"
}
123K

signDisplay

Browser support

Available in Chrome from version 77 Chrome
Available in Edge from version 79 Edge
Available in Firefox from version 78 Firefox
Available in Opera from version 64 Opera
Available in Safari from version 14.1 Safari
Available in Chrome Android from version 77 Chrome Android
Available in Firefox for Android from version 79 Firefox for Android
Available in Opera Android from version 55 Opera Android
Available in Safari on iOS from version 14.5 Safari on iOS
Available in Samsung Internet from version 12.0 Samsung Internet
Available in WebView Android from version 77 WebView Android
Available in WebView on iOS from version 14.5 WebView on iOS
Available in Deno from version 1.8 Deno
Available in Node.js from version 12.11.0 Node.js
{
signDisplay: "auto"
}
123,456.789
{
signDisplay: "never"
}
123,456.789
{
signDisplay: "always"
}
+123,456.789
{
signDisplay: "exceptZero"
}
+123,456.789

useGrouping

Browser support

Available in Chrome from version 24 Chrome
Available in Edge from version 12 Edge
Available in Firefox from version 29 Firefox
Available in Opera from version 15 Opera
Available in Safari from version 10 Safari
Available in Chrome Android from version 25 Chrome Android
Available in Firefox for Android from version 56 Firefox for Android
Available in Opera Android from version 14 Opera Android
Available in Safari on iOS from version 10 Safari on iOS
Available in Samsung Internet from version 1.5 Samsung Internet
Available in WebView Android from version 4.4 WebView Android
Available in WebView on iOS from version 10 WebView on iOS
Available in Deno from version 1.8 Deno
Available in Node.js from version 13.0.0 Node.js
{
useGrouping: true
}
123,456.789
{
useGrouping: false
}
123456.789

minimumIntegerDigits

Browser support

Available in Chrome from version 24 Chrome
Available in Edge from version 12 Edge
Available in Firefox from version 29 Firefox
Available in Opera from version 15 Opera
Available in Safari from version 10 Safari
Available in Chrome Android from version 25 Chrome Android
Available in Firefox for Android from version 56 Firefox for Android
Available in Opera Android from version 14 Opera Android
Available in Safari on iOS from version 10 Safari on iOS
Available in Samsung Internet from version 1.5 Samsung Internet
Available in WebView Android from version 4.4 WebView Android
Available in WebView on iOS from version 10 WebView on iOS
Available in Deno from version 1.8 Deno
Available in Node.js from version 0.12.0 Node.js
{
minimumIntegerDigits: 1
}
123,456.789
{
minimumIntegerDigits: 2
}
123,456.789
{
minimumIntegerDigits: 3
}
123,456.789
{
minimumIntegerDigits: 4
}
123,456.789
{
minimumIntegerDigits: 5
}
123,456.789

minimumFractionDigits

Browser support

Available in Chrome from version 24 Chrome
Available in Edge from version 12 Edge
Available in Firefox from version 29 Firefox
Available in Opera from version 15 Opera
Available in Safari from version 10 Safari
Available in Chrome Android from version 25 Chrome Android
Available in Firefox for Android from version 56 Firefox for Android
Available in Opera Android from version 14 Opera Android
Available in Safari on iOS from version 10 Safari on iOS
Available in Samsung Internet from version 1.5 Samsung Internet
Available in WebView Android from version 4.4 WebView Android
Available in WebView on iOS from version 10 WebView on iOS
Available in Deno from version 1.8 Deno
Available in Node.js from version 0.12.0 Node.js
{
minimumFractionDigits: 1
}
123,456.789
{
minimumFractionDigits: 2
}
123,456.789
{
minimumFractionDigits: 3
}
123,456.789
{
minimumFractionDigits: 4
}
123,456.7890
{
minimumFractionDigits: 5
}
123,456.78900

maximumFractionDigits

Browser support

Available in Chrome from version 24 Chrome
Available in Edge from version 12 Edge
Available in Firefox from version 29 Firefox
Available in Opera from version 15 Opera
Available in Safari from version 10 Safari
Available in Chrome Android from version 25 Chrome Android
Available in Firefox for Android from version 56 Firefox for Android
Available in Opera Android from version 14 Opera Android
Available in Safari on iOS from version 10 Safari on iOS
Available in Samsung Internet from version 1.5 Samsung Internet
Available in WebView Android from version 4.4 WebView Android
Available in WebView on iOS from version 10 WebView on iOS
Available in Deno from version 1.8 Deno
Available in Node.js from version 0.12.0 Node.js
{
maximumFractionDigits: 1
}
123,456.8
{
maximumFractionDigits: 2
}
123,456.79
{
maximumFractionDigits: 3
}
123,456.789
{
maximumFractionDigits: 4
}
123,456.789
{
maximumFractionDigits: 5
}
123,456.789

minimumSignificantDigits

Browser support

Available in Chrome from version 24 Chrome
Available in Edge from version 12 Edge
Available in Firefox from version 29 Firefox
Available in Opera from version 15 Opera
Available in Safari from version 10 Safari
Available in Chrome Android from version 25 Chrome Android
Available in Firefox for Android from version 56 Firefox for Android
Available in Opera Android from version 14 Opera Android
Available in Safari on iOS from version 10 Safari on iOS
Available in Samsung Internet from version 1.5 Samsung Internet
Available in WebView Android from version 4.4 WebView Android
Available in WebView on iOS from version 10 WebView on iOS
Available in Deno from version 1.8 Deno
Available in Node.js from version 0.12.0 Node.js
{
minimumSignificantDigits: 1
}
123,456.789
{
minimumSignificantDigits: 2
}
123,456.789
{
minimumSignificantDigits: 3
}
123,456.789
{
minimumSignificantDigits: 4
}
123,456.789
{
minimumSignificantDigits: 5
}
123,456.789

maximumSignificantDigits

Browser support

Available in Chrome from version 24 Chrome
Available in Edge from version 12 Edge
Available in Firefox from version 29 Firefox
Available in Opera from version 15 Opera
Available in Safari from version 10 Safari
Available in Chrome Android from version 25 Chrome Android
Available in Firefox for Android from version 56 Firefox for Android
Available in Opera Android from version 14 Opera Android
Available in Safari on iOS from version 10 Safari on iOS
Available in Samsung Internet from version 1.5 Samsung Internet
Available in WebView Android from version 4.4 WebView Android
Available in WebView on iOS from version 10 WebView on iOS
Available in Deno from version 1.8 Deno
Available in Node.js from version 0.12.0 Node.js
{
maximumSignificantDigits: 1
}
100,000
{
maximumSignificantDigits: 2
}
120,000
{
maximumSignificantDigits: 3
}
123,000
{
maximumSignificantDigits: 4
}
123,500
{
maximumSignificantDigits: 5
}
123,460

roundingIncrement

Browser support

Partial support

Available in Chrome from version 106 Chrome
Available in Edge from version 106 Edge
Available in Firefox from version 116 Firefox
Available in Opera from version 92 Opera
Available in Safari from version 15.4 Safari
Available in Chrome Android from version 106 Chrome Android
Available in Firefox for Android from version 116 Firefox for Android
Available in Opera Android from version 72 Opera Android
Available in Safari on iOS from version 15.4 Safari on iOS
Available in Samsung Internet from version 20.0 Samsung Internet
Available in WebView Android from version 106 WebView Android
Available in WebView on iOS from version 15.4 WebView on iOS
Not available in Deno Deno
Available in Node.js from version 19.0.0 Node.js
{
roundingIncrement: 1
}
123,456.789
{
roundingIncrement: 2
}
123,456
{
roundingIncrement: 5
}
123,455
{
roundingIncrement: 10
}
123,460
{
roundingIncrement: 20
}
123,460
{
roundingIncrement: 25
}
123,450
{
roundingIncrement: 50
}
123,450
{
roundingIncrement: 100
}
123,500
{
roundingIncrement: 200
}
123,400
{
roundingIncrement: 250
}
123,500
{
roundingIncrement: 500
}
123,500
{
roundingIncrement: 1000
}
123,000
{
roundingIncrement: 2000
}
124,000
{
roundingIncrement: 2500
}
122,500
{
roundingIncrement: 5000
}
125,000

roundingMode

Browser support

Partial support

Available in Chrome from version 106 Chrome
Available in Edge from version 106 Edge
Available in Firefox from version 116 Firefox
Available in Opera from version 92 Opera
Available in Safari from version 15.4 Safari
Available in Chrome Android from version 106 Chrome Android
Available in Firefox for Android from version 116 Firefox for Android
Available in Opera Android from version 72 Opera Android
Available in Safari on iOS from version 15.4 Safari on iOS
Available in Samsung Internet from version 20.0 Samsung Internet
Available in WebView Android from version 106 WebView Android
Available in WebView on iOS from version 15.4 WebView on iOS
Not available in Deno Deno
Available in Node.js from version 19.0.0 Node.js
{
roundingMode: "ceil"
}
123,456.789
{
roundingMode: "floor"
}
123,456.789
{
roundingMode: "expand"
}
123,456.789
{
roundingMode: "trunc"
}
123,456.789
{
roundingMode: "halfCeil"
}
123,456.789
{
roundingMode: "halfFloor"
}
123,456.789
{
roundingMode: "halfExpand"
}
123,456.789
{
roundingMode: "halfTrunc"
}
123,456.789
{
roundingMode: "halfEven"
}
123,456.789

roundingPriority

Browser support

Partial support

Available in Chrome from version 106 Chrome
Available in Edge from version 106 Edge
Available in Firefox from version 116 Firefox
Available in Opera from version 92 Opera
Available in Safari from version 15.4 Safari
Available in Chrome Android from version 106 Chrome Android
Available in Firefox for Android from version 116 Firefox for Android
Available in Opera Android from version 72 Opera Android
Available in Safari on iOS from version 15.4 Safari on iOS
Available in Samsung Internet from version 20.0 Samsung Internet
Available in WebView Android from version 106 WebView Android
Available in WebView on iOS from version 15.4 WebView on iOS
Not available in Deno Deno
Available in Node.js from version 19.0.0 Node.js
{
roundingPriority: "auto"
}
123,456.789
{
roundingPriority: "morePrecision"
}
123,456.789
{
roundingPriority: "lessPrecision"
}
123,456.789

trailingZeroDisplay

Browser support

Partial support

Available in Chrome from version 106 Chrome
Available in Edge from version 106 Edge
Available in Firefox from version 116 Firefox
Available in Opera from version 92 Opera
Available in Safari from version 15.4 Safari
Available in Chrome Android from version 106 Chrome Android
Available in Firefox for Android from version 116 Firefox for Android
Available in Opera Android from version 72 Opera Android
Available in Safari on iOS from version 15.4 Safari on iOS
Available in Samsung Internet from version 20.0 Samsung Internet
Available in WebView Android from version 106 WebView Android
Available in WebView on iOS from version 15.4 WebView on iOS
Not available in Deno Deno
Available in Node.js from version 19.0.0 Node.js
{
trailingZeroDisplay: "auto"
}
123,456.789
{
trailingZeroDisplay: "stripIfInteger"
}
123,456.789

localeMatcher

Browser support

Available in Chrome from version 24 Chrome
Available in Edge from version 12 Edge
Available in Firefox from version 29 Firefox
Available in Opera from version 15 Opera
Available in Safari from version 10 Safari
Available in Chrome Android from version 25 Chrome Android
Available in Firefox for Android from version 56 Firefox for Android
Available in Opera Android from version 14 Opera Android
Available in Safari on iOS from version 10 Safari on iOS
Available in Samsung Internet from version 1.5 Samsung Internet
Available in WebView Android from version 4.4 WebView Android
Available in WebView on iOS from version 10 WebView on iOS
Available in Deno from version 1.8 Deno
Available in Node.js from version 0.12.0 Node.js
{
localeMatcher: "best fit"
}
123,456.789
{
localeMatcher: "lookup"
}
123,456.789