What is a token decimals converter?
A token decimals converter translates between the raw integer a token contract stores and the human amount a wallet shows, using the token's decimals value: amount = raw ÷ 10decimals. ERC-20 and TRC-20 contracts expose it through decimals(); an SPL mint stores it in the mint account. USDT and USDC use 6, WBTC 8, and ETH-like tokens 18.
Common token decimals
| Token | Decimals | 1 token as raw integer |
|---|---|---|
| USDT (Ethereum, Tron, Solana, Polygon, Arbitrum) | 6 | 1,000,000 |
| USDC (all major chains) | 6 | 1,000,000 |
| USDT on BNB Smart Chain (Binance-Peg) | 18 | 1,000,000,000,000,000,000 |
| WBTC, cbBTC | 8 | 100,000,000 |
| ETH, WETH, DAI, LINK, UNI, AAVE | 18 | 1,000,000,000,000,000,000 |
| SOL and most SPL tokens | 9 | 1,000,000,000 |
| GUSD | 2 | 100 |
How the conversion works
human = raw ÷ 10decimals and raw = human × 10decimals. The catch is precision: 18-decimal values exceed what a floating-point number can represent, so this page uses arbitrary-precision integers. Entering more decimal places than the token supports is rejected, because the chain cannot represent that amount.
Worked example
An ERC-20 Transfer event shows value = 2500000. If the token is USDC (6 decimals) that is 2.5 USDC. If the same number came from a DAI transfer (18 decimals) it would be 0.0000000000025 DAI, a dust amount. Going the other way, to send 0.0025 WBTC (8 decimals) the argument to transfer must be 0.0025 × 108 = 250,000, and sending 1 LINK (18 decimals) requires 1,000,000,000,000,000,000.
Common mistakes
- Assuming 18. Hard-coding 1018 turns a 100 USDC payment into 0.0000000001 USDC. Read
decimals()from the contract. - Trusting the symbol. Bridged tokens with the same ticker can use different decimals on different chains. Check the contract you are actually interacting with.
- Rounding before multiplying. Convert the human amount to the raw integer first, then do arithmetic in integers; floating point can produce 2499999.9999 instead of 2500000.
In code
- ethers.js:
ethers.parseUnits("1.5", 6)→1500000n;ethers.formatUnits(1500000n, 6)→"1.5". - web3.py:
int(Decimal("1.5") * 10**6); avoidfloat. - Solana web3.js: amounts in
createTransferInstructionare raw integers; multiply by10 ** mint.decimalsusing BigInt.
For native coins see the Ethereum unit converter, satoshi converter, lamports converter and sun converter.