$devtoolkit.sh/tools/token-unit-converter

Token Unit Converter

Convert between token base units and display units with custom decimal support for any ERC-20.

Display units1
Base units1000000000000000000
1 display unit = 10^18 base units (1,000,000,000,000,000,000 base units)

Related Tools

FAQ

What are token decimals in ERC-20?
ERC-20 tokens store amounts as integers in their smart contracts. The decimals() field tells wallets and UIs how many decimal places to display. A token with 18 decimals stores 1 display unit as 10^18 base units. USDC uses 6 decimals, so 1 USDC = 1,000,000 base units.
How do I convert base units to display units?
Divide the base unit amount by 10^decimals. For example, 1500000 base units with 6 decimals = 1500000 / 10^6 = 1.5 display units. For large numbers, BigInt arithmetic prevents precision loss.
Which tokens use non-18 decimals?
Common examples: USDC and USDT use 6 decimals, WBTC uses 8 decimals, DAI uses 18 decimals. Always check the token contract's decimals() function rather than assuming 18 for any ERC-20 token.

Enter a token amount and the token's decimal precision (default 18 for ETH) to convert between base units (e.g. wei for ETH) and display units (e.g. ether). Supports any ERC-20 token with custom decimals (0–36). Useful for DeFi development, smart contract debugging, and token amount calculations.

/tools/token-unit-converterv1.0.0