coderef

BigIntBaseline · Widely available

The BigInt JavaScript type represents integers of any size, including integers too large for the primitive Number type.

Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Sep 16, 2020. Widely available since Mar 16, 2023.

Browser support

DesktopChrome
1–66Not supported
67+Supportedsince May 29, 2018
Current: 155
Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154
Firefox
1–67Not supported
68+Supportedsince Jul 9, 2019
Current: 157
Safari
1–13.1Not supported
14+Supportedsince Sep 16, 2020
Current: 27
MobileChrome Android
18–66Not supported
67+Supportedsince May 31, 2018
Current: 155
Firefox Android
4–67Not supported
68+Supportedsince Jul 9, 2019
Current: 157
Safari iOS
1–13.4Not supported
14+Supportedsince Sep 16, 2020
Current: 27

How to use

This feature is Baseline widely available — use it freely, no fallback needed.

Example

Full syntax and examples are on MDN: BigInt.

Feature detection

JS · check before using
if (typeof BigInt !== "undefined") {
  // BigInt is available
}

Sub-features

Support for each part of the feature (6). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
BigInt67796814676814
BigInt.BigInt67796814676814
BigInt.asIntN67796814676814
BigInt.asUintN67796814676814
BigInt.toString67796814676814
BigInt.valueOf67796814676814