stablecoins.toolsDeveloper utility · local only
Strings in. Exact units out.

Precision you
can inspect.

Convert between decimal strings and raw integer units. Rescale only when it’s exact. Bring your own decimals and numeric interface.

01 / Define the representation

Configure your conversion

ERC-20 metadata is optional. Decimals are never inferred from a name or symbol. Selecting uint256 sets a numeric bound; it does not verify any contract.

Unsigned digits and decimal point only. Maximum 1,024 input characters. No exponents, signs, separators or automatic rounding.

02 / Inspect the result

Exact output

Your exact result will appear here.

All numeric outputs are strings. This preserves integers beyond JavaScript’s safe Number range.

A tiny example

1.000001 with 6 decimals becomes 1000001 raw units. Converting back returns the same decimal value.

This is a synthetic fixture, not a token or account observation.

Enter decimals and choose an interface explicitly.

Why explicit decimals?

EIP-20 makes decimals metadata optional. A display representation divides the raw integer by 10 raised to the chosen decimals. Enter the precision supplied by the interface you are developing against; this utility makes no network queries.

Exact, or a clear error

Conversions use decimal strings and BigInt, never floating-point amounts. Extra fractional digits are accepted only when they are zero. Rescaling downward must divide evenly. uint256 accepts 0 through 2256 − 1; arbitrary unsigned mode caps results at 1,024 digits.

Source and target decimals range from 0 to 255. Output removes redundant leading and fractional trailing zeros. The round trip demonstrates equality of the numeric value, not original text formatting.

A local development aid

Your input stays in this tab’s memory. It is not sent, persisted or included in telemetry. Reset clears the form; reloading starts fresh. Hosting may log ordinary page requests.

This workbench is limited to numeric representations and synthetic examples. It has no wallet, address, balance, RPC, rate, payment or advisory functionality.

Privacy and optional measurement

Optional measurement is off by default. On this site's exact production address, Google Analytics can count fixed actions only after you explicitly allow it for this page visit and its collector is ready. This site uses its own verified measurement destination. It counts fixed successful manual actions, with no automatic pageviews, enhanced measurement or advertising features. Bundled example actions are excluded.

Your numeric input, decimals, interface choices, conversion direction, precision results and query strings are not included in application event payloads. Google may process technical identifiers and connection information after opt-in; measurement is not anonymous. DNT and Global Privacy Control keep it off. Consent is not stored, and actions before consent or readiness are never replayed.

Turning measurement off removes its helper frame and this site's measurement cookies. It stops future optional counts but does not delete data already received by Google. The local utilities and downloads work without measurement. Export events describe a download request, not confirmed saved files, unique people or customer demand.