| [ Web Proxy ] |
| Viewing: https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/BigInt/toLocaleString | [Back] [Original] |
Get to know MDN better
This page was translated from English by the community. Learn more and join the MDN Web Docs community.
This feature is well established and works across many devices and browser versions. Its been available across browsers since 2020 9.
BigInt toLocaleString() BigInt . Intl.NumberFormat API Intl.NumberFormat .
toLocaleString . NumberFormat format() . format Intl.NumberFormat format() .
const bigint = 123456789123456789n;
// German uses period for thousands
console.log(bigint.toLocaleString("de-DE"));
// Expected output: "123.456.789.123.456.789"
// Request a currency format
console.log(
bigint.toLocaleString("de-DE", { style: "currency", currency: "EUR" }),
);
// Expected output: "123.456.789.123.456.789,00 "
toLocaleString()
toLocaleString(locales)
toLocaleString(locales, options)
locales and options .
Intl.NumberFormat API Intl.NumberFormat() . Intl.NumberFormat .
locales OptionalBCP 47 . Intl.NumberFormat() locales .
Intl.NumberFormat .
options Optional . Intl.NumberFormat() options .
Intl.NumberFormat .
BigInt .
Intl.NumberFormat new Intl.NumberFormat(locales, options).format(number) .
:
toLocaleString() . , , . toLocaleString() .
locale .
const bigint = 3500n;
console.log(bigint.toLocaleString());
// "3,500" U.S English
locales locales API . toLocaleString() . locales options Intl , .
function toLocaleStringSupportsLocales() {
return (
typeof Intl === "object" &&
!!Intl &&
typeof Intl.NumberFormat === "function"
);
}
. locales ( ) .
const bigint = 123456789123456789n;
// .
console.log(bigint.toLocaleString("de-DE"));
// 123.456.789.123.456.789
// .
console.log(bigint.toLocaleString("ar-EG"));
//
// /lakh/crore .
console.log(bigint.toLocaleString("en-IN"));
// 1,23,45,67,89,12,34,56,789
// nu .(: 10)
console.log(bigint.toLocaleString("zh-Hans-CN-u-nu-hanidec"));
// ,,,,,
// ( ) .
console.log(bigint.toLocaleString(["ban", "id"]));
// 123.456.789.123.456.789
toLocaleString() options .
const bigint = 123456789123456789n;
//
console.log(
bigint.toLocaleString("de-DE", { style: "currency", currency: "EUR" }),
);
// 123.456.789.123.456.789,00
//
console.log(
bigint.toLocaleString("ja-JP", { style: "currency", currency: "JPY" }),
);
// 123,456,789,123,456,789
// 3
console.log(bigint.toLocaleString("en-IN", { maximumSignificantDigits: 3 }));
// 1,23,00,00,00,00,00,00,000
| Specification |
|---|
| ECMAScript 2027 Internationalization API Specification # sup-bigint.prototype.tolocalestring |
This page was last modified on 2025 6 24 by MDN contributors.
BigIntObject/FunctionObject.prototype.__defineGetter__()Object.prototype.__defineSetter__()Object.prototype.__lookupGetter__()Object.prototype.__lookupSetter__()Object.prototype.hasOwnProperty()Object.prototype.isPrototypeOf()Object.prototype.propertyIsEnumerable()Object.prototype.toLocaleString()Object.prototype.toString()Object.prototype.valueOf()Your blueprint for a better internet.
Portions of this content are 19982026 by individual mozilla.org contributors. Content available under a Creative Commons license.
| Web Proxy Viewer | New URL | Original Page |