Skip to content
ihategas.xyz

Unit Converter

Wei, gwei, ether and any token decimals — integer maths only.

Runs offline

10⁰
10⁹ · gas prices
10¹⁸
USDC is 6, WBTC is 8

Enter a value in any unit. The others update from it.

About unit converter

Ethereum stores every amount as an integer. One ether is 10¹⁸ wei, gas prices are quoted in gwei (10⁹ wei), and every ERC-20 picks its own number of decimals — USDC uses 6, WBTC uses 8, most others use 18. Getting that exponent wrong is how people accidentally send a thousand times too much. This converter does the arithmetic in integers rather than floating point, so a value with eighteen significant digits survives the round trip intact.

Common questions

How many wei are in 1 ETH?

One ETH is 1,000,000,000,000,000,000 wei — ten to the eighteenth. Wei is the smallest indivisible unit and every amount on Ethereum is really an integer number of them; the decimal form is a display convenience.

What is gwei and how does it relate to ETH?

A gwei is a billion wei, or 0.000000001 ETH. It exists because gas prices in wei would be unreadable strings of digits and in ETH would be a row of leading zeros, so gwei is the unit that keeps a gas price to a couple of significant figures.

Why does my token have 6 decimals instead of 18?

Because each token contract declares its own, and there is no standard value. USDC and USDT use six, WBTC uses eight, and most others use eighteen — so the same integer means a millionfold different amount depending on the token. Reading the wrong one is the most common way an amount is entered wrong by a factor of a trillion.

More developer tools