ReCaseText

Token Decimal Converter

Convert between human-readable token amounts and raw integer values

About Token Decimal Converter

ERC-20 tokens and tokens on other blockchains store balances as large integers without decimal points. The number of "decimals" defined in the token contract tells wallets and apps where to place the decimal point for display. For example, USDC has 6 decimals, so a raw balance of 1000000 represents 1.000000 USDC. ETH and most ERC-20 tokens use 18 decimals, so 1 token is stored as 1000000000000000000.

This tool converts in both directions: give it a raw integer and the number of decimals, and it shows the human-readable amount. Or give it a human-readable amount and it returns the raw integer you would pass to a smart contract function. It uses arbitrary-precision arithmetic to handle the very large numbers common in blockchain development without floating-point errors.

Frequently asked questions

What are token decimals?

Token decimals define where the decimal point goes in a raw integer balance. USDC uses 6 decimals, WBTC uses 8, and most ERC-20 tokens use 18.

Why not just use regular numbers?

Blockchains use integers to avoid floating-point precision issues. The decimals metadata tells UIs how to display the number with a decimal point.

Does this handle very large numbers?

Yes. It uses BigInt arithmetic to handle numbers up to 36 decimal places without precision loss.