Wei to ETH and Token Unit Converter
One ETH equals 1018 wei and 109 gwei, so to convert wei to ETH you divide by 1,000,000,000,000,000,000. Other tokens use their own decimals: USDC has 6 on most chains, so 1 USDC is 1,000,000 base units. This converter works in both directions with exact integer math, never floating point.
What are wei, gwei and ether?
Ethereum never stores fractions. Every balance on-chain is a whole number of the smallest unit, called wei. Ether (ETH) is the unit people read and gwei (giga-wei) is the unit that gas prices are quoted in. The relationship is fixed: 1 ETH = 109 gwei = 1018 wei. Typing in any of the three boxes above updates the other two.
What are token decimals?
ERC-20 tokens copy the same idea. A token contract stores balances as integers and declares a decimals value that says where the decimal point goes. A balance of 1500000 on a token with 6 decimals means 1.5 tokens. The raw integer is what smart contracts, transaction calldata and block explorers use, while wallets show the human-readable value.
| Token | Chain | Decimals | 1 token in base units |
|---|
| ETH | Any EVM chain | 18 | 1000000000000000000 |
| USDC | Ethereum, Base, Arbitrum | 6 | 1000000 |
| USDC | BNB Chain | 18 | 1000000000000000000 |
| WBTC | Ethereum | 8 | 100000000 |
| DAI | Ethereum | 18 | 1000000000000000000 |
The BNB Chain row is the trap. Sending a raw amount computed with 6 decimals to an 18-decimal token moves a trillionth of what you meant. The second converter above reads decimals per chain from the txpay token registry, including overrides like this one. For the background see the guide to token decimals and native vs bridged USDC.
How to convert a token amount to wei or base units
- Pick the chain and the token. The decimals appear right under the selectors.
- Type the human amount, for example
12.5 USDC. - Read the raw base units:
12500000. Paste that integer wherever a contract call or API wants the amount. - To go the other way, type the integer in the raw box and read the human amount.
Why exact arithmetic matters
JavaScript numbers are 64-bit floats and lose exactness above 9,007,199,254,740,991. One ETH in wei is already 1018, so Number maths on wei silently rounds. This tool parses and formats with BigInt through viem's parseUnits and formatUnits, so 1 wei and 123456789.123456789012345678 ETH both round-trip exactly.
What input is rejected
Empty input, negative numbers, scientific notation such as 1e5, hex, thousands separators, a trailing decimal point, more decimal places than the token supports, fractions in a raw-unit field and anything above the uint256 maximum all show a specific message instead of a wrong answer.
Related tools and guides
Frequently asked questions
How many wei are in one ETH?
One ETH is 1,000,000,000,000,000,000 wei (10^18). One gwei is 1,000,000,000 wei (10^9), so one ETH is also 1,000,000,000 gwei.
What is gwei used for?
Gwei is the everyday unit for gas prices. A gas price of 20 gwei means each unit of gas costs 20 billionths of an ETH. Wallets and block explorers quote fees in gwei because wei is too small and ETH too large.
How many decimals does USDC have?
USDC has 6 decimals on Ethereum, Base, Arbitrum, Optimism, Polygon and most other chains, so 1 USDC is 1,000,000 base units. Binance-Peg USDC on BNB Chain is an exception and uses 18 decimals.
Why does the same token have different decimals on different chains?
Each chain deploys its own token contract and the deployer chooses the decimals. Bridged or pegged versions can differ from the original. The raw integer a contract stores only means something together with that contract's decimals, so always check them per chain.
What is the largest amount a token contract can hold?
ERC-20 balances are unsigned 256-bit integers, so the largest raw value is 2^256 - 1, about 1.16 x 10^77. This converter rejects anything above that, because it cannot exist on-chain.
Is my input sent to a server?
No. All conversion happens in your browser using exact integer (BigInt) arithmetic. Nothing you type is uploaded or stored.