Token decimals: why USDC has 6 and BNB Chain uses 18

Token decimals say how many places a token’s whole unit is divided into. A smart contract stores only integers. A token with 6 decimals stores 1,000,000 units for each one you see, a token with 18 stores 1018. USDC uses 6 on most chains, but the USDC contract on BNB Chain uses 18.

What decimals actually are

There are no fractions inside a token contract. A balance is a whole number of the smallest unit. The decimals value is metadata telling wallets and apps where to put the decimal point when they display it. A balance of 25500000 on a 6-decimal token shows as 25.5.

That means the same integer can be a very different amount depending on the token. The number 1000000 is one USDC at 6 decimals, one millionth of a USDC at 18 decimals, and one hundredth of a WBTC at 8. Every amount that crosses a boundary, between contract and screen or between two chains, must carry its decimals with it.

Decimals of tokens txpay supports

The values below come from txpay’s token registry. Native assets use the smallest unit of their own chain.

TokenDecimalsSmallest unitOne whole unit in base units
USDC6 (18 on BNB Chain)10-6 USDC1,000,000
USDT6 (18 on BNB Chain)10-6 USDT1,000,000
DAI1810-18 DAI1,000,000,000,000,000,000
ETH181 wei1,000,000,000,000,000,000
WBTC810-8 WBTC100,000,000
BTC81 satoshi100,000,000
SOL91 lamport1,000,000,000

Two details are often missed. USDC on Solana is a separate token from USDC on Ethereum and has 6 decimals. And a wrapped asset need not inherit its original’s decimals: WBTC has 8, in line with bitcoin, while WETH has 18, in line with ether.

Why USDC has 6 decimals

No rule says it must. Ethereum’s ERC-20 standard makes decimals() optional and leaves the value to the issuer. ETH’s 18 is a property of the wei, and most tokens copied 18 from it. A dollar stablecoin gains nothing from 18 places: one millionth of a dollar is already far below any price a person pays, and six places is enough for micro-payments. The issuer’s choice stuck, and USDT followed with the same number on most chains. We could not find a single published rationale from either issuer, so treat the reasoning above as sensible rather than official.

Why BNB Chain is different

On BNB Chain the USDC and USDT contracts that txpay lists both use 18 decimals, as the registry’s override for chain 56 shows. They are Binance-pegged tokens, not the issuers’ own contracts on that chain, and they follow the 18-decimal convention used across BNB Chain’s token list. When value moves between chains, the bridging layer rescales the amount so 100 USDC stays 100 USDC, even though the integer changes from100,000,000 to 100,000,000,000,000,000,000.

AmountUSDC on Ethereum or Base (6)USDC on BNB Chain (18)
1 USDC1,000,0001,000,000,000,000,000,000
100 USDC100,000,000100,000,000,000,000,000,000
0.5 USDC500,000500,000,000,000,000,000

Read the live value from a token’s decimals() function in an explorer’s “Read contract” tab, or from the token page for that chain, such as USDC on BNB Chain against USDC on Base. The BNB Chain page lists the other tokens there.

Bugs that wrong decimals cause

  • A hardcoded 6. Request 100 USDC on BNB Chain with six decimals and you ask for 100,000,000 base units, which is 0.0000000001 USDC.
  • A hardcoded 18. Send 100 USDC on Base with 18 decimals and the integer is 1020, which is 100 trillion USDC. The transaction fails for lack of balance.
  • Floating point. JavaScript numbers are exact only to 253, about 9 quadrillion. One ether is 1018 wei, so ordinary amounts overflow that. Use integer types (BigInt) or decimal strings.
  • Copying amounts between chains. A raw integer from an explorer is not transferable between chains without its decimals.
  • Rounding for display. Showing 2 places is fine for a screen. Never round what you send or store.

How to convert, step by step

  1. Find the decimals for that token on that chain, not for the symbol in general.
  2. Human to base units: multiply by 10 to the power of decimals and keep the result as an integer. 25.5 USDC at 6 decimals is 25,500,000.
  3. Base units to human: divide by the same power. 25,500,000 is 25.5.
  4. Use exact arithmetic. In viem, parseUnits("25.5", 6) returns 25500000n, and formatUnits reverses it.
  5. Check the result with the token unit converter, which converts for any token and chain in the registry.

A worked example: a 25 USDC link on BNB Chain

A receiver creates a link for 25 USDC on BNB Chain. The link stores the amount as the human figure, 25. When a payer opens it, the payment card needs the exact amount the receiver must get, in base units. It looks up the decimals for USDC on chain 56, finds the override of 18, and asks the router to deliver 25 × 1018 base units, which is 25,000,000,000,000,000,000. For the same link on Base, the figure would be 25 × 106, or 25,000,000. If the lookup used the symbol alone and not the chain, one of the two would be off by a factor of a trillion, which is why the decimals are stored per token and per chain.

Three ways to check decimals yourself

  • Explorer. Open the token’s contract, choose “Read contract” and call decimals. It returns a small integer.
  • Wallet. Token details in most wallets show the decimals when you add a custom token. They should match the explorer.
  • A reference page. The pair pages list the decimals for each token and chain in txpay’s registry, and the token unit converter applies them for you.

If two of these disagree, trust the contract and stop until you know why. A mismatch is also a sign you are looking at the wrong token, which the native vs bridged USDC guide covers.

What this means for payment links

On a txpay link you enter amounts the human way, and the payment card converts them into base units using the decimals of the link’s token on the link’s chain. Recorded payments are stored as decimal strings such as 0.000242, never as raw base units. If you reconcile payments yourself against on-chain data, apply the decimals for the right chain too. For how to set up receiving, see how to accept USDC payments, and for the issue of two USDCs on one chain, native vs bridged USDC.

Frequently asked questions

Why does USDC have 6 decimals when ETH has 18?

Because each token chooses its own. ETH’s 18 comes from its smallest unit, the wei, being one quintillionth of an ether. USDC’s issuer chose 6, which is finer than any price a person pays and still small enough to store compactly. No standard forces either number, and the contract reports its choice through decimals().

Does USDC really use 18 decimals on BNB Chain?

The USDC contract that txpay lists for BNB Chain uses 18, where USDC on Ethereum, Base, Arbitrum and most other chains uses 6. The BNB Chain token is a Binance-pegged version rather than a Circle-issued one. If you work with BNB Chain USDC, read decimals() from the contract instead of assuming 6.

What goes wrong if I use the wrong decimals?

Amounts are off by a power of ten. Treating 18-decimal USDC as 6-decimal turns 100 USDC into 0.0000000001, and the reverse request asks for 100 trillion. On a payment page that either rejects or underpays, and in a spreadsheet it quietly corrupts your books. Always use the decimals for that token on that chain.

How do I convert between a token amount and base units?

Multiply the human amount by 10 to the power of decimals to get the integer base units, and divide to go back. For 25.5 USDC at 6 decimals that is 25,500,000. Use integer or decimal-string math rather than floating point, since JavaScript numbers lose exact precision above about 9 quadrillion.

A txpay link carries the recipient, amount, token and chain, so the payer only has to pick what they pay with. Creating one is free.

Create a payment link