JavaScript BigInt Reference Last Updated : 23 Jul, 2025 Suggest changes Share 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. K kartik Follow Article Tags : JavaScript Web Technologies JavaScript-BigInt Explore JavaScript BasicsIntroduction to JavaScript4 min readVariables and Datatypes in JavaScript6 min readJavaScript Operators5 min readControl Statements in JavaScript4 min readArray & StringJavaScript Arrays7 min readJavaScript Array Methods7 min readJavaScript Strings5 min readJavaScript String Methods9 min readFunction & ObjectFunctions in JavaScript5 min readJavaScript Function Expression3 min readFunction Overloading in JavaScript4 min readObjects in JavaScript4 min readJavaScript Object Constructors4 min readOOPObject Oriented Programming in JavaScript3 min readClasses and Objects in JavaScript4 min readWhat Are Access Modifiers In JavaScript ?5 min readJavaScript Constructor Method7 min readAsynchronous JavaScriptAsynchronous JavaScript2 min readJavaScript Callbacks4 min readJavaScript Promise4 min readEvent Loop in JavaScript4 min readAsync and Await in JavaScript2 min readException HandlingJavascript Error and Exceptional Handling6 min readJavaScript Errors Throw and Try to Catch2 min readHow to create custom errors in JavaScript ?2 min readJavaScript TypeError - Invalid Array.prototype.sort argument1 min readDOMHTML DOM (Document Object Model)9 min readHow to select DOM Elements in JavaScript ?3 min readJavaScript Custom Events4 min readJavaScript addEventListener() with Examples9 min readAdvanced TopicsClosure in JavaScript4 min readJavaScript Hoisting6 min readScope of Variables in JavaScript3 min readJavaScript Higher Order Functions7 min readDebugging in JavaScript4 min read My Profile ${profileImgHtml} My Profile Edit Profile My Courses Join Community Transactions Logout Like