Loading search...

ETH to Wei Converter

Convert between ETH, Gwei, and Wei — the three units you encounter in Ethereum wallets, gas fees, and smart contracts. Enter any value and all conversions update instantly.

eth
Copy
gWei
Copy
wei
Copy
Universal Base Convertor
Base
Copy
Copy

Ethereum Units: Wei, Gwei, and ETH Explained

Ethereum uses three denominations in everyday practice. Understanding when each is used avoids costly mistakes in smart contracts and transactions.

UnitAlternative NameWei ValueETH ValueUsed for
WeiWei110⁻¹⁸ ETHSmart contract internals
KweiBabbage10³10⁻¹⁵ ETHRarely used directly
MweiLovelace10⁶10⁻¹² ETHRarely used directly
GweiShannon10⁹10⁻⁹ ETHGas prices (wallets, EIP-1559)
TweiSzabo10¹²10⁻⁶ ETHMicro-ETH calculations
PweiFinney10¹⁵10⁻³ ETHMilli-ETH calculations
EtherETH10¹⁸1 ETHPrices, balances, transfers

Why Wei Matters for Developers

In Solidity, all ETH values are represented as integers in Wei. The msg.value field,address.balance, and all token amounts use Wei. Using floating-point numbers for ETH amounts causes rounding errors — always store and calculate in Wei.

  • Solidity: msg.value is always in Wei — divide by 1e18 to get ETH
  • ethers.js: ethers.parseEther("1.0") returns 1000000000000000000n (Wei as BigInt)
  • web3.js: web3.utils.toWei("1", "ether") returns "1000000000000000000"

Frequently Asked Questions

What is Wei in Ethereum?

Wei is the smallest denomination of Ether (ETH). 1 ETH = 10^18 Wei (1,000,000,000,000,000,000 Wei). It is named after Wei Dai, the cryptographer who created b-money, a precursor to Bitcoin. All Ethereum transactions and smart contract operations are internally denominated in Wei.

What is Gwei and when do I use it?

Gwei (gigawei) equals 10^9 Wei, or 1,000,000,000 Wei. It is the standard unit for expressing Ethereum gas prices. When you set a gas price in MetaMask or any Ethereum wallet, you are setting it in Gwei. A typical transaction during normal network conditions costs 10–50 Gwei per unit of gas.

How is Ethereum gas calculated?

Gas cost = gas units × gas price (in Gwei). For example, a standard ETH transfer uses 21,000 gas units. At 20 Gwei gas price: 21,000 × 20 Gwei = 420,000 Gwei = 0.00042 ETH. Gas prices vary with network congestion — check current prices on Etherscan before sending.

Why does ETH have 18 decimal places?

ETH has 18 decimal places to allow microtransactions and precise smart contract accounting. This matches the common ERC-20 token standard (18 decimals), making ETH and tokens interoperable. The smallest unit, Wei, represents 0.000000000000000001 ETH — enough precision for any conceivable transaction size.

When should I use Wei vs Gwei in smart contracts?

Smart contract code always works in Wei internally. Use Wei when dealing with raw balances (e.g., msg.value in Solidity is always in Wei). Use Gwei only for human-readable gas price display. Never store ETH amounts as floating-point numbers in contracts — always use Wei as an integer to avoid rounding errors.

Related Tools