• EasyStackTools191+ Free Tools
    • Color Converter
    • Cron Expression Reader
    • CSV to JSON
    • JSON to CSV
    • YAML to JSON
    • Hex ↔ Text
    • Wei ↔ Gwei ↔ ETH
    • Hex ↔ Decimal
  1. Home
  2. Converters
  3. Wei ↔ Gwei ↔ ETH

Wei ↔ Gwei ↔ ETH

Convert Ethereum token units between Wei, Gwei, and ETH with support for BigInt precision. Perfect for smart contract developers.

Read the guide

Unit Converter

Edit any field to auto-convert

Understanding Ethereum Units

Ethereum uses three primary units for transaction values and token amounts: Wei, Gwei, and ETH. Understanding the relationships between these units is essential for smart contract development, gas calculations, and token transfers.

Wei

The smallest unit of Ethereum

1 ETH = 1018 Wei

Used internally in smart contracts and blockchain state.

Gwei

Gas price unit

1 ETH = 109 Gwei

Standard for expressing gas prices and small transactions.

ETH

Human-readable unit

Base unit for trading

The primary unit seen on exchanges and in wallets.

Conversion Reference

FromToFormula
WeiGwei÷ 109
WeiETH÷ 1018
GweiWei× 109
GweiETH÷ 109
ETHWei× 1018
ETHGwei× 109

Solidity Example

How units are used in smart contracts:

// Token transfer: 1 ETH = 10^18 Wei
function transfer(address to, uint256 amount) {
  // amount = 1000000000000000000 (1 ETH in Wei)
  _balances[to] += amount;
}

// Gas price in Gwei
uint256 gasPrice = 25 gwei; // 25 * 10^9 Wei

// Working with decimals (18 decimals for USDC)
uint256 oneUsdc = 1e6; // 6 decimals = 1,000,000 units

// Common pattern: amount * 10^decimals
uint256 amount = 100 * 10**18; // 100 ETH in Wei

Why BigInt?

  • •Handles 1018 without precision loss
  • •No rounding errors in conversions
  • •Matches smart contract integer math
  • •Essential for large token amounts

Common Use Cases

  • •Calculating gas fees (price in Gwei)
  • •Token transfers (amount in Wei)
  • •Wallet displays (convert to ETH)
  • •Smart contract debugging

Decimal Handling

When entering ETH with decimals (e.g., 1.5 ETH), the converter properly handles the decimal point and converts to exact Wei amounts without precision loss. This is critical for accurate contract interactions and wallet operations.

Frequently Asked Questions

Smart contracts use Wei (the smallest unit), wallets display ETH, and gas prices are quoted in Gwei. Accurate conversions are essential for development and debugging.

Related Tools

  • Hex ↔ Decimal

    Convert between hexadecimal values and decimal uint256-style integers. Perfect for decoding Ethereum calldata, logs, and on-chain uint256 values.

  • Checksum Address Generator

    Convert Ethereum addresses to checksummed format using EIP-55 standard. Validate addresses with built-in verification. Free, secure, client-side processing.

  • Keccak256 Hasher

    Generate keccak256 hash online instantly. Solidity compatible hashing for Ethereum smart contract development. UTF-8 text and hex input modes.

  • Color Converter

    Convert colors between HEX, RGB, HSL, and CMYK formats. Color picker with preview.