# Convert Ether to Wei without web3

I don't want to load the web3 library, I do however want to convert Either to Wei, does anyone have a JavaScript function to share.

• Web3 is the most popular for this sort of thing, but you can try `ethereum-units` instead Oct 24, 2017 at 7:46
• One ether is 1e18 wei. HOWEVER you will need the JavaScript big number library to be able to use numbers this large without rounding errors.
– Alex
Oct 24, 2017 at 16:40

Just multiply the number of ether by 1e18 (or 10**18). Done and done!

• Is there is difference in performance of manually multiplying and using the web3 method ? Oct 24, 2017 at 16:28
• FTR you actually need to multiply with 1e18 (and not 10e18) Sep 5, 2021 at 1:46

Accourding to this table:

• Wei = 10^0 Wei
• Babbage = 10^6 Wei
• Shannon = 10^9 Wei
• Szabo = 10^12 Wei
• Finney = 10^15 Wei
• Ether = 10^18 Wei

1 Ether is 1^18 = 1000000000000000000 Wei.

1 Wei is 0.000000000000000001 Ether.

In javascript it would be `wei = eth_amount*10e17`. Not `*10e18` . `e` counts as the `10` and `*10e18` would multiply your eth by one order of magnitude too many!