Turns out it's as easy as passing it to the Number constructor:

const myBigInt = BigInt(10);  // `10n` also works
const myNumber = Number(myBigInt);

Of course, you should bear in mind that your BigInt value must be within [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER] for the conversion to work properly, as stated in the question.

Answer from Lucio Paiva on Stack Overflow
🌐
W3Schools
w3schools.com › js › js_bigint.asp
JavaScript BigInt
BigInt is the second numeric data type in JavaScript (after Number). With BigInt the total number of supported data types in JavaScript is 8:
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › BigInt
BigInt - JavaScript | MDN
BigInt values are similar to Number values in some ways, but also differ in a few key matters: A BigInt value cannot be used with methods in the built-in Math object and cannot be mixed with a Number value in operations; they must be coerced to the same type.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Errors › Cant_convert_BigInt_to_number
TypeError: can't convert BigInt to number - JavaScript | MDN
If an operation involves a mix of BigInts and numbers, it's ambiguous whether the result should be a BigInt or number, since there may be loss of precision in both cases. The error also happens when a BigInt is implicitly converted to a number via the number coercion process.
🌐
web.dev
web.dev › learn › javascript › data-types › bigint
BigInt | web.dev
BigInt values don't inherit the methods and properties by the Number object provides, and they can't be used with the methods JavaScript's built-in Math object provides. Most importantly, you can't mix BigInt and Number primitives in standard arithmetic operations: 9999999999999999n + 5 > Uncaught TypeError: can't convert BigInt to number
🌐
JavaScript.info
javascript.info › tutorial › the javascript language › miscellaneous
BigInt
The unary plus operator +value is a well-known way to convert value to a number. In order to avoid confusion, it’s not supported on bigints:
🌐
Mastering JS
masteringjs.io › tutorials › fundamentals › bigint-to-number
Convert a BigInt to a Number in JavaScript - Mastering JS
Keep in mind that, if the BigInt is larger than Number.MAX_VALUE or smaller than Number.MIN_VALUE, Number(bigint) will be positive or negative infinity. const tooBig = Number(10n**10000n); tooBig === Number.POSITIVE_INFINITY; // true tooBig; // Infinity const tooSmall = Number((-10n)**10001n); tooSmall === Number.NEGATIVE_INFINITY; // true tooSmall; // -Infinity
🌐
Reddit
reddit.com › r/learnjavascript › how to convert bigint to number as native as possible and as accurate as possible without using string-based solution?
r/learnjavascript on Reddit: How to convert BigInt to Number as native as possible and as accurate as possible WITHOUT using string-based solution?
September 3, 2024 -

The working problem like this...

If I have a big number: 12,345,678,901,234,567,890

Which is expressed as BigInt: 12345678901234567890n

I want to convert it so that the result should be: 1.2345678901234568e19 (i.e. typeof x === "Number"). Note: the last digit is rounded up from 7 to 8, since the next digit in the source big number is 8 - which is 5 or above.

Using a solution which is as native as possible, and as accurate as possible.

One suggested solution in this SO answer was to simply use Number(x). But the result is 12345678901234567000 or 1.2345678901234567e19. i.e. it's truncated rather than rounded, due to integer limitation in 64-bit floating-point data type.

Other SO suggestion was using string based solution which is NOT what I need.

One solution which I know is to split the BigInt into 2 parts (upper & lower digits) first, then combine them back as Number using pure math and scaling. But it's kind of a round about solution, and I consider it only as a last resort.

So, is there a better way to do it?

Find elsewhere
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › difference-between-bigint-and-number-in-javascript
Difference Between BigInt and Number in JavaScript - GeeksforGeeks
July 23, 2025 - Both serve distinct purposes and have unique characteristics making them suitable for the different scenarios. This article explores the differences between the BigInt and Number in JavaScript their characteristics, applications and provides examples to the illustrate their usage.
🌐
LogRocket
blog.logrocket.com › home › how to use javascript’s bigint
How to use JavaScript's BigInt - LogRocket Blog
June 4, 2024 - Generally, all the arithmetic operations except (/) will give a correct mathematical answer when used between two or more bigint values. For instance, the division operator doesn’t give an accurate result at all times. This means that operations such as 5n/2n will round off to 2n instead of 2.5n. The JavaScript number type is written as double-precision 64-bit binary format IEEE 754 value, meaning that 52 bits are used for significant values while one bit and 11 bits are used for the sign and exponents.
🌐
Designcise
designcise.com › web › tutorial › how-to-convert-a-javascript-bigint-value-to-a-number
How to Convert a JavaScript BigInt Value to a Number? - Designcise
September 13, 2021 - You can convert a bigint to a number by simply using the Number wrapper object like so: // ES10+ const MAX_SAFE_INTEGER = 9007199254740991n; console.log(Number(MAX_SAFE_INTEGER)); // 9007199254740991 Please be aware that the precision of a BigInt ...
🌐
Math.js
mathjs.org › docs › datatypes › bigints.html
math.js | an extensive math library for JavaScript and Node.js
When using a bigint in a function that does not support it, like sqrt, it will convert the bigint into a regular number and then execute the function: ... // convert a number to bigint or BigNumber math.bigint(42) // bigint, 42n math.bignumber(42) // BigNumber, 42 // convert a bigint to a number or BigNumber math.number(42n) // number, 42 math.bignumber(42n) // BigNumber, 42 // losing digits when converting to number math.number(70000000000000000123n) // number, 7000000000000000000
🌐
JavaScript Tutorial
javascripttutorial.net › home › javascript tutorial › javascript bigint
JavaScript BigInt
November 14, 2024 - To make a BigInt, you append n to the end of the number literal, for example: let bigInt = 9007199254740991n;Code language: JavaScript (javascript)
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › javascript-bigint
JavaScript BigInt - GeeksforGeeks
December 4, 2025 - A BigInt is similar to a Number in some ways, however, it cannot be used with methods of the builtin Math object and cannot be mixed with instances of Number in operations.
🌐
Medium
medium.com › @vdsnini › how-i-discovered-the-power-of-bigint-in-javascript-a16d6cc5671f
How I Discovered the Power of BigInt in JavaScript | by Beenish Khan | Medium
February 17, 2025 - JSON.stringify({ value: BigInt(123).toString() }); Final Thoughts Before this, I never really thought about JavaScript’s number limitations. But running into this bug forced me to dig deeper, and I’m glad I did.
🌐
V8
v8.dev › features › bigint
BigInt: arbitrary-precision integers in JavaScript · V8
Large integer IDs and high-accuracy timestamps cannot safely be represented as Numbers in JavaScript. This often leads to real-world bugs, and causes JavaScript developers to represent them as strings instead. With BigInt, this data can now be represented as numeric values.
🌐
W3docs
w3docs.com › learn-javascript › bigint.html
Mastering JavaScript: A Comprehensive Guide to BigInt and Beyond
This guide will focus on BigInt's functionality, showcase practical code examples, and extend into more advanced JavaScript topics. BigInt is a numeric type that enables representation of integers beyond the Number type's limit of 2^53 - 1, ...
🌐
Scaler
scaler.com › home › topics › javascript bigint library
JavaScript BigInt Library - Scaler Topics
September 29, 2023 - It is a primitive data type in javascript that can be created by adding n at the end position of the integer. We can also do this by using the BigInt() function and passing the integer value as the parameter of this function using the new operator.
🌐
npm
npmjs.com › package › big-integer
big-integer - npm
Base 0 is only allowed for the number zero. ... Converts a bigInt to a native Javascript number.
      » npm install big-integer
    
Published   Nov 21, 2023
Version   1.6.52
Author   Peter Olson