Expected value back:
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
In Web3 you can simply do:
let bigNumber = web3.toBigNumber('0xFFFFFF') web3.fromWei(bigNumber)
You can use the BigNumber library:
var value_wei = "0x2c1c986f1c48000"; var value_ether = new BigNumber(value_wei).dividedBy(new BigNumber("1000000000000000000");
Note that all functions in web3.js always return values in wei as a BigNumber object, so the return of web3.eth.getBalance(...) can be directly used with the lines above, for example.