← Mochi Tools

Token unit converter

Convert exact decimal amounts to and from blockchain base units.

About this tool

How do I use this tool?

Convert exact decimal amounts to and from blockchain base units. Enter your data, run the tool and review the output before using it.

What should I check before using the result?

Choose the actual token decimals. No exchange rate is used. Values are calculated with integer arithmetic and are never rounded into a different base-unit amount.

Worked example

With 6 decimal places, 1.25 tokens becomes 1250000 base units. An amount needing more than 6 decimal places is rejected instead of rounded.

base_units = amount × 10^decimals

Related tools

Method references

Documentation updated