Skip to content

Convert between Wei, Gwei, Ether and any token decimals with exact big-number precision.

Loading tool

About Unit Converter

Convert an amount between wei, kwei, mwei, gwei, szabo, finney and ether, plus a custom row for any token decimals (0 to 77). Type in any field and the others update. All math uses integers (bigint), so there is no floating-point rounding, and the base value is also shown in wei as decimal, grouped and hex.

Common uses

  • Turn a gas price in gwei into wei for an RPC call or a test
  • Convert a raw ERC-20 balance to a human amount using the token's decimals (6 for USDC, 8 for WBTC, 18 for most tokens)
  • Check how many wei a value like 1.5 ETH is before hard-coding it in a script
  • Get the hex wei value to paste into eth_sendTransaction or a cast command

FAQ

How many wei are in one ether?
1 ether = 10^18 wei (1,000,000,000,000,000,000). Wei is the smallest unit and the one stored on-chain.
How many wei are in one gwei?
1 gwei = 10^9 wei, and 1 ether = 10^9 gwei. Gas prices are usually quoted in gwei.
Why can't I enter more decimals than a unit allows?
Amounts on-chain are whole numbers of wei, so a value with more decimal places than the unit's exponent would be a fraction of a wei. The converter rejects it instead of silently rounding.
How do I convert token amounts that don't use 18 decimals?
Set the custom decimals field to the token's decimals() value, e.g. 6 for USDC or USDT, and type the amount in the custom row.