unit converter

wei, gwei, ether, and any decimals: usdc 6, wbtc 8.

ether units

try
weithe base unit
gwei10⁹ wei · gas prices
ether10¹⁸ wei

any token, by decimals

try
decimalsdecimals()
raw on-chain amountbalanceOf / amount
formatUnits(1500000, 6)
1.5

about this tool

Convert between wei, gwei and ether, or any token amount by decimals (USDC 6, WBTC 8, 18 for most ERC-20s). Exact, no floating point rounding.

good to know

how many wei in one ether?

1 ether = 10^18 wei = 1,000,000,000 gwei. gas prices are usually quoted in gwei.

why not just multiply by 1e18 in javascript?

js numbers are floats and lose precision past 2^53. this converter works on bigints, the same way parseUnits and formatUnits do, so every digit is exact.

what decimals does my token use?

call decimals() on it. usdc and usdt use 6, wbtc 8, most other erc-20s 18. never assume 18.