Wei

The smallest atomic unit.

1 Ether = 1018 Wei. Gas costs returned by eth_gasPrice are in Wei as hex. Converting the raw hex gives you the exact Wei amount without rounding.

Gwei

The gas price standard.

EIP-1559 base fees come back as hex integers in Wei. Divide by 109 to get the Gwei figure you see on gas trackers. Our tool does this instantly alongside the raw decimal.

Ether

The account balance unit.

eth_getBalance returns hex Wei. Divide by 1018 to get the ETH figure a wallet shows the user. Our Ether output handles this conversion precisely using BigInt.

Why Ethereum chose hexadecimal.

JSON transport

JSON has no native 256-bit integer type. Ethereum represents all integers as "0x..." hex strings so they can be transmitted precisely over HTTP without floating-point loss.

Compact encoding

One hex digit = 4 bits = one nibble. A 32-byte hash (256 bits) becomes 64 hex characters. Binary would require 256 characters; decimal would be an unwieldy 78-digit number.

EVM alignment

The Ethereum Virtual Machine (EVM) operates on 32-byte (256-bit) words. Hex maps directly to these words — one 64-char hex string, one EVM word.

Common RPC hex fields.

RPC MethodHex FieldMeaningUnit
eth_blockNumberresultCurrent block heightblock number
eth_getBalanceresultAccount ETH balanceWei
eth_gasPriceresultCurrent gas priceWei
eth_maxFeePerGasresultEIP-1559 max feeWei
eth_getTransactionByHashvalueETH transferredWei
eth_getTransactionByHashgasGas limitgas units
eth_getTransactionByHashnonceSender tx countcount
eth_getTransactionReceiptgasUsedGas actually usedgas units