How the conversion works
A token is stored and moved as a whole number of its smallest unit. USDC has 6 decimals, so its smallest unit is one millionth: 0.000001 USDC. To go from dollars to base units you multiply by 1,000,000; to go back, you divide.
| USDC | Base units |
|---|---|
| 0.000001 | 1 |
| 0.01 | 10,000 |
| 0.5 | 500,000 |
| 1 | 1,000,000 |
| 25 | 25,000,000 |
decimals() value before converting.Why money is not kept as decimal numbers
Programs store decimal numbers as binary approximations. In JavaScript, 0.1 + 0.2 gives 0.30000000000000004, not 0.3. In a payment, that invisible leftover can make an amount fail to match and get the payment rejected.
This tool never goes through those numbers: it reads the text you type, splits the whole part from the decimal part and works only with integers. That is why the result is exact even for very large amounts.
Where you will meet these units
In x402, the amount field of each payment option comes in atomic units of the asset, written as text: "10000" with USDC is 0.01 USDC. To see every field of a PAYMENT-REQUIRED header, use the x402 header decoder. If you sell an API and want to work out what amount to set, use the price-per-call calculator.
{ "scheme": "exact", "network": "eip155:8453", "amount": "10000"}To understand the whole protocol, read the guide to what x402 is.
Frequently asked questions
How many decimals does USDC have?
Six. One base unit is 0.000001 USDC, and 1 USDC is 1,000,000 base units. Other tokens can use a different number, for example 18, so always check the decimals of the token you use.
Why does it not round if I type more than 6 decimal places?
Because silent rounding changes the amount without you noticing. The tool warns you and asks you to fix the value; extra zeros at the end are accepted.
Is what I type sent to a server?
No. The conversion happens in your browser and the page does not send or store the values you type. You do not need to sign up either.
Does Nouron Pass use these units?
Nouron Pass is in early access and works in the Sandbox; it does not process real payments or x402 payments yet. This tool helps you understand the units before they exist.
Try these limits in the Sandbox
Nouron Pass is designed to enforce limits outside the agent. Today it runs in the Sandbox. Reserve your spot and we will write to you when your access opens.