Ethereum Unit Converter: Wei ↔ Gwei ↔ Ether

Type a value in any unit and the others update instantly. Calculations use exact integer arithmetic, so wei amounts with 18 decimals are never rounded the way spreadsheets and JavaScript numbers round them.

Converted in your browser with JavaScript. Addresses are never uploaded or stored.

What is an Ethereum unit converter?

An Ethereum unit converter translates amounts between wei, the integer unit the protocol uses, and the human-scale units built on it: 1 gwei = 109 wei and 1 ether = 1018 wei. Balances, transaction values and gas prices on chain are all integers in wei, so converting exactly, without floating-point rounding, is what keeps the last digits of an 18-decimal amount correct.

Gas fee calculator

Ethereum units table

UnitWeiEther
wei110-18
kwei (babbage)10310-15
mwei (lovelace)10610-12
gwei (shannon)10910-9
szabo (microether)101210-6
finney (milliether)101510-3
ether10181

Where you meet each unit

Worked example

An RPC call returns a balance of 0x1bc16d674ec80000. In decimal that is 2,000,000,000,000,000,000 wei. Dividing by 109 gives 2,000,000,000 gwei, and by 1018 gives exactly 2 ETH. Going the other way, a 0.000021 ETH fee is 21,000 gwei, or 21,000,000,000,000 wei, which is what a 21,000-gas transfer at 1 gwei costs.

Converting in code

ethers.js: ethers.parseEther("1.5") returns wei as a BigInt and ethers.formatUnits(wei, "gwei") goes the other way. web3.py: Web3.to_wei(1.5, "ether") and Web3.from_wei(v, "gwei"). Never multiply by 1e18 with floating point in production code; use the library helpers or integer arithmetic, as this page does.

Need to check an address before sending? Use the EIP-55 checksum converter. For token amounts with other decimals, see the token decimals converter.

Frequently asked questions

How many wei are in one ether?

1 ether = 1,000,000,000,000,000,000 wei (1018). 1 gwei = 109 wei, so 1 ether = 1,000,000,000 gwei.

What is gwei used for?

Gas prices. A gas price of 20 gwei means 20,000,000,000 wei per unit of gas. A standard 21,000-gas transfer at 20 gwei costs 420,000 gwei = 0.00042 ETH. Use the calculator below the converter.

Why do the small unit names look odd?

Kwei (babbage), mwei (lovelace), gwei (shannon), szabo and finney were named after computer-science and cypherpunk figures in early Ethereum documentation. In practice only wei, gwei and ether are used.

Why does my spreadsheet give a different answer?

Spreadsheets and ordinary JavaScript use 64-bit floating point with about 15 to 17 significant digits. An ether value with 18 decimals exceeds that, so the last digits are rounded. This page uses arbitrary-precision integers.

Is 1 gwei the same as 1 shannon?

Yes. Shannon is the historical name for 109 wei; gwei (giga-wei) is the name everyone uses today. Likewise finney is 1015 wei and szabo is 1012 wei.

Can I paste a value from Etherscan?

Yes. Commas and spaces are stripped, scientific notation such as 1e18 is accepted, and a value with more decimals than the unit allows is rejected rather than silently rounded.