◈Chain FieldnotesETHEREUM, EXPLAINEDTry a free tool ↗
Ethereum basics · FIELDNOTES

Wei, Gwei, and ETH: Exact Conversions Explained

Convert Ethereum denominations using integer arithmetic, including all 18 decimal places of ETH.

One asset, several denominations

Wei, gwei, and ETH describe different scales of the same Ethereum-native asset. A conversion between them does not involve an exchange rate or a trade. The relationship is fixed: one ETH contains 10 to the eighteenth power wei, and one gwei contains one billion wei. Gwei is convenient for discussing gas prices because those prices would otherwise contain long strings of zeros.

Separate denomination conversion from valuation. Converting 0.01 ETH into wei tells you the same quantity in another unit. It says nothing about what that quantity could buy in dollars, whether a transaction is sensible, or whether an address is trustworthy.

Why a calculator should preserve the smallest unit

The number of wei in one ETH is larger than the range in which ordinary JavaScript numbers represent every integer exactly. Parsing a long wei value as a floating-point number can discard digits. The loss may be invisible in a neatly formatted result, which is why an exact converter should keep the value as decimal text and use integer arithmetic.

This converter separates the whole and fractional parts, checks the allowed decimal places, and constructs an integer wei amount using BigInt. It then inserts a decimal point at the correct position for the requested denomination. No market data is queried and no wallet connection is involved.

InputEquivalent amountUseful check
1 ETH1,000,000,000 gweiMain unit relationship
1 gwei1,000,000,000 weiGas-price denomination
0.000000001 ETH1 gweiSmall ETH quantity
0.000000000000000001 ETH1 weiSmallest supported ETH fraction

Use explicit units at every step

Choose the input unit before entering a value. A number such as 20 is ambiguous without its denomination: 20 wei and 20 gwei differ by a factor of one billion. Copying an amount between applications is safest when you verify both the number and the destination field’s expected unit.

The tool rejects commas, exponent notation, negative values, and fractions smaller than one wei. That is deliberate. For example, a value with nineteen fractional ETH digits cannot always be represented as a whole wei amount. Rounding it automatically would create a different quantity from the one you entered.

Do not apply ETH decimals to every token

Other tokens can use different decimal scales. A token balance displayed as a raw integer is interpreted using that token’s own rules, not automatically Ethereum’s eighteen-place ETH convention. A familiar-looking address or ticker is not enough to establish the scale. Read the relevant token documentation or verified contract information.

Use denomination conversion as one step in a larger verification process: confirm the network, asset, units, and intended operation separately. Exact arithmetic is useful, but it cannot detect a wrong recipient or an unsafe contract interaction.

Source / further reading: ethereum.org ↗
Editorial note: This guide was prepared with AI assistance and reviewed for its examples and tool behavior during development. It does not claim independent professional accreditation or firsthand product testing beyond the included tools.