JavaScript Number MAX_SAFE_INTEGER property

Definition and usage

Number.MAX_SAFE_INTEGER Represents the maximum safe integer in JavaScript.

Number.MAX_SAFE_INTEGER For (253 - 1).

See also:

MIN_SAFE_INTEGER property

MAX_VALUE property

MIN_VALUE property

NEGATIVE_INFINITY property

POSITIVE_INFINITY property

Example

let x = Number.MAX_SAFE_INTEGER;

Try it yourself

Number.MAX_SAFE_INTEGER

MAX_SAFE_INTEGER is a property of the JavaScript Number object.

You can only use it as Number.MAX_SAFE_INTEGER.

Using x.MAX_SAFE_INTEGER, where x is a variable, will return undefined:

Example

let x = 100;
x.MAX_SAFE_INTEGER;

Try it yourself

Syntax

Number.MAX_SAFE_INTEGER

Return value

Type Description
Number 9007199254740991

Browser support

Number.MAX_SAFE_INTEGER It is an ECMAScript6 (ES6) feature.

All modern browsers support ES6 (JavaScript 2015):

Chrome IE Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Supported Supported Supported Supported Supported

Internet Explorer 11 (or earlier versions) does not support Number.MAX_SAFE_INTEGER.