Token decimals converter: exact ERC-20 base units

Offline edition · 29 November 2026. Optional reference links need internet. No inputs are sent or stored by these tools.

A raw token amount is an integer. Divide it by 10 to the power of the token’s decimals to get the display amount. This converter keeps every digit and rejects excess fractional precision instead of rounding.

Convert exactly in either direction

Enter the decimals for the specific contract and network you have verified. A token symbol alone does not identify its decimals.

Have a list? Batch-convert up to 200 amounts ↓

Examples are hypothetical and do not identify a token.

No wallet, contract lookup, token price or network request is required by this converter. Downloaded spreadsheets should import exact amounts as text.

How to convert a token amount to base units

  1. Verify the contract address and network using the project’s official documentation and a suitable explorer.
  2. Find the contract’s decimals value. ERC-20 defines this metadata method as optional; do not assume 18 when it is unavailable.
  3. Select the conversion direction and enter plain digits, with a decimal point only for a display amount. Do not use commas, signs or exponential notation.
  4. Select Convert exactly. Read both representations before using the amount elsewhere.

Worked example: six decimal places

For a hypothetical token with six decimals, 1.234567 tokens is exactly 1,234,567 base units. One base unit is 0.000001 tokens. An amount of 0.0000001 tokens cannot be represented; the converter rejects it. It does not round that amount into a valid transfer.

Why ordinary number handling can change the value

JavaScript’s standard Number type cannot represent every integer above 9,007,199,254,740,991 exactly. A raw amount can exceed that range even for an ordinary display balance. This converter parses strings into BigInt values and formats decimal positions without floating-point multiplication.

For an 18-decimal example, raw 9007199254740993123456789 becomes exactly 9007199.254740993123456789. This is a deliberately large precision exercise, not a token balance lookup.

Limits and what the result means

Decimals must be a whole number from 0 to 255, matching the ERC-20 metadata type. Raw amounts must fit the unsigned 256-bit integer range. Those type limits do not mean a real token has that supply or accepts the amount. The tool accepts nonnegative plain decimals only and rejects any fractional digits beyond the selected decimals, including additional trailing zeros. No balances, transfer restrictions, recipient or contract identity are checked.

“Base units” is the generic label here. Wei is an Ethereum native-asset denomination; not every ERC-20 token’s smallest unit is called wei. For native assets, use the ETH, SOL and XRP unit converter or Bitcoin/satoshi converter.

Source and learning path

Primary reference reviewed 29 November 2026: ERC-20 decimals and integer amounts. Read the token decimals guide, then practise in the interactive number lab.

Batch-convert a list of token amounts

Paste up to 200 amounts, one per line, all using the same decimals and direction. Every row must be valid before any download becomes available. No addresses or other personal details are needed.

Choose a single or batch JSON export from this converter, up to 128 KB. The file is read locally, checked and loaded as raw amounts. Then select Convert the whole batch. Nothing is uploaded.

JSON stores raw and display amounts as strings to preserve digits. Import CSV amount columns as text in spreadsheets. The total is an arithmetic sum, not a transfer, allocation or balance check. Duplicate amounts are counted as separate rows. Inputs are not saved by the converter.