JavaScript BigInt Reference Last Updated : 23 Jul, 2025 Comments Improve Suggest changes Like Article Like Report JavaScript BigInt is an inbuilt object in JavaScript that provides a way to represent whole numbers larger than 253-1 which is the largest number that can represent with the Number primitive. It is represented by the MAX_SAFE_INTEGER constant.Example: This example creates a BigInt by appending n at the end of the number. JavaScript // Decimal format let bigNum = 123422222222222222222222222222222222222n console.log(bigNum) // Hexadecimal format let bigHex = 0x1ffffffeeeeeeeeefn console.log(bigHex) // Binary format let bigBin = 0b1010101001010101001111111111111111n console.log(bigBin) Output:123422222222222222222222222222222222222n VM41:6 36893488074118328047n VM41:10 11430854655nThe complete methods of the JavaScript BigInt object are listed below:JavaScript BigInt Constructor: A constructor gets called when an object is created using the new keyword.ConstructorDescriptionsBigInt()Convert any primitive data type or object to a BigInt data type.JavaScript BigInt Properties: A JavaScript property is a member of an object that associates a key with a value.Instance Property: An instance property is a property that has a new copy for every new instance of the class.Instance PropertiesDescriptionsconstructorReturn the bigInt constructor function for the object.JavaScript BigInt Methods: Methods are actions that can be performed on objects.Static Method: If the method is called using the BigInt class itself then it is called a static method of BigInt.Static MethodsDescriptionsasIntN()Wrap a BigInt value to a signed integer between -2width-1 and 2width-1-1.asUintN()Wrap a BigInt value to an unsigned integer between 0 and 2width-1.Instance Method: If the method is called on an instance of a number then it is called an instance method.Instance MethodsDescriptionstoLocaleString()Return a string with a language-sensitive representation of this BigInt.toString()Return a string representing the specified BigInt object.valueOf()Return the wrapped primitive value of a BigInt object. Comment More infoAdvertise with us Next Article JavaScript BigInt toString() Method K kartik Follow Improve Article Tags : JavaScript Web Technologies JavaScript-BigInt Similar Reads JavaScript BigInt JavaScript BigInt is a built-in object that represents whole numbers larger than (2^{53} - 1). A BigInt value, also known as a bigint primitive, is created by appending n to an integer literal or by calling the BigInt() function with an integer or string value. It allows precise arithmetic with inte 4 min read JavaScript BigInt JavaScript BigInt is a built-in object that represents whole numbers larger than (2^{53} - 1). A BigInt value, also known as a bigint primitive, is created by appending n to an integer literal or by calling the BigInt() function with an integer or string value. It allows precise arithmetic with inte 4 min read JavaScript BigInt toString() Method The BigInt.toString() method is an inbuilt method in JavaScript that is used to return a string representing the specified BigInt object. Syntax: bigIntObj.toString( radix ) Parameters: This function accepts a single parameter and it is optional. radix: It is an integer value in the range of 2 throu 1 min read JavaScript BigInt toString() Method The BigInt.toString() method is an inbuilt method in JavaScript that is used to return a string representing the specified BigInt object. Syntax: bigIntObj.toString( radix ) Parameters: This function accepts a single parameter and it is optional. radix: It is an integer value in the range of 2 throu 1 min read JavaScript BigInt toString() Method The BigInt.toString() method is an inbuilt method in JavaScript that is used to return a string representing the specified BigInt object. Syntax: bigIntObj.toString( radix ) Parameters: This function accepts a single parameter and it is optional. radix: It is an integer value in the range of 2 throu 1 min read JavaScript BigInt valueOf() Method The BigInt.toString() method is an inbuilt method in JavaScript that is used to return the wrapped primitive value of a BigInt object. Syntax: bigIntObj.valueOf() Parameters: This method does not accept any parameter. Return value: This method returns a BigInt representing the primitive value of the 1 min read Like