Ethereum uses many named denominations, but every value on-chain is ultimately an integer count of wei, the smallest unit. This converter takes a value in any standard unit and converts it precisely across all of them, then shows the result in decimal, scientific notation, and hexadecimal wei. All arithmetic is done in exact integers using BigInt, so there is no floating-point drift even for fractional ether inputs.
How it works
Each unit is defined by its power-of-ten relationship to wei:
wei = 1 (10^0)
kwei = 1,000 (10^3)
mwei = 1,000,000 (10^6)
gwei = 10^9
szabo = 10^12
finney = 10^15
ether = 10^18
The tool parses your input, including a decimal fraction, and scales it into an exact integer number of wei. From that single canonical wei value it derives every other unit by dividing by the appropriate power of ten, keeping a fractional remainder where needed. The hexadecimal form is the wei integer encoded in base 16, the representation Ethereum JSON-RPC expects for value and gas quantities.
Worked example
Enter 0.000000025 ether (for example, a gas priority fee of 25 gwei):
- Gwei:
25 - Wei:
25,000,000,000 - Hex wei:
0x5d21dba00 - Scientific notation:
2.5 × 10¹⁰
You can paste 0x5d21dba00 directly into an EIP-1559 maxPriorityFeePerGas field in a raw transaction or in a JSON-RPC eth_sendRawTransaction call.
Which unit to use where
| Context | Conventional unit | Why |
|---|---|---|
| Wallet balances | Ether | Human-readable; 1 ETH = meaningful quantity |
| Gas prices (base fee, tip) | Gwei | Keeps numbers in the single-digits to hundreds range |
| Smart contract value parameters | Wei | On-chain arithmetic is always in wei; no conversion needed |
JSON-RPC fields (value, gas) | Hex wei | Protocol requirement — all numeric fields are hex-encoded wei |
| DeFi amounts in Solidity | Wei (as uint256) | Avoids floating-point; 1 ether in Solidity = 1e18 |
Why floating-point fails here
JavaScript’s Number type has 53 bits of mantissa precision, giving exact integer representation up to 2⁵³ − 1 (about 9 × 10¹⁵). One ether expressed in wei is 10¹⁸ — already larger. A wallet balance of 10 ETH in wei is 10¹⁹, safely beyond the safe integer range. Arithmetic on such values using ordinary Number silently rounds to the nearest representable float, potentially corrupting the last few digits.
For example, in JavaScript without BigInt:
10 * 1e18 // → 10000000000000000000 (appears correct)
// but:
10000000000000000001 === 10000000000000000000 // true — last digit lost
This converter parses all values to BigInt and performs every intermediate calculation as exact integer arithmetic, so even a balance of 1,000 ETH expressed in wei or a large gas limit in nanosecond-precision timestamps converts without error.
Named units and their origins
The intermediate units are named after cypherpunk pioneers:
- Szabo (10¹² wei = 1 microether): Nick Szabo, originator of the concept of smart contracts.
- Finney (10¹⁵ wei = 1 milliether): Hal Finney, early Bitcoin contributor and recipient of Satoshi’s first transaction.
- Wei (10⁰): Wei Dai, creator of b-money, a precursor to Bitcoin.
These units appear in older Ethereum documentation and some libraries (ethers.js v5 and below, web3.js) but are rarely used in day-to-day development — most developers work in gwei for gas and wei for contract arithmetic.
All conversions run locally in your browser. Nothing you enter is uploaded.