Converters

Crypto Unit Converter: wei, gwei, lamports, sun, drops

Blockchains never store โ€œ1.5 ETHโ€ or โ€œ0.2 SOLโ€. They store whole numbers of a tiny base unit โ€” wei, lamports, sun, drops, satoshis โ€” and wallets move the decimal point for display. Developers, API users and anyone reading a block explorer constantly need to convert between them. Pick a chain and a unit, type an amount, and get every other denomination at once, computed with exact integer arithmetic.

UnitAmount
wei21,000,000,000,000
kwei (babbage)21,000,000,000
mwei (lovelace)21,000,000
gwei (shannon)21,000
szabo (microether)21
finney (milliether)0.021
ETH (ether)0.000021

How to use the unit converter

Choose the blockchain, then the unit you are converting from, and enter the amount. The table lists the same value in every unit of that chain; press โ€œCopyโ€ next to any row to copy the exact string. If the live price of the coin is available, the dollar value is shown under the table.

Values are handled as big integers internally, so even 18-decimal amounts like 0.000000000000000001 ETH (1 wei) are exact. If you type more decimals than the smallest unit allows โ€” for example 0.5 wei โ€” the converter tells you the amount is impossible rather than rounding.

Base units by blockchain

These are the native coin denominations. Each line shows how many base units make one whole coin.

  • Ethereum and EVM chains (BNB Chain, Polygon, Arbitrum, Baseโ€ฆ): 1 ETH = 10ยนโธ wei = 10โน gwei. Named units: kwei (babbage), mwei (lovelace), gwei (shannon), szabo, finney.
  • Bitcoin: 1 BTC = 10โธ satoshis; 1 sat = 1,000 millisatoshis on Lightning; 1 bit = 100 sats; 1 mBTC = 100,000 sats.
  • Solana: 1 SOL = 10โน lamports.
  • TRON: 1 TRX = 10โถ sun.
  • XRP Ledger: 1 XRP = 10โถ drops.
  • Litecoin: 1 LTC = 10โธ litoshis. Dogecoin: 1 DOGE = 10โธ koinu.

The formula

Converting is just moving the decimal point by the difference in exponents:

amount_in_target = amount ร— 10^(exp_from โˆ’ exp_to) 21,000 gwei โ†’ ETH: 21,000 ร— 10^(9 โˆ’ 18) = 0.000021 ETH 0.25 SOL โ†’ lamports: 0.25 ร— 10^9 = 250,000,000 12.5 TRX โ†’ sun: 12.5 ร— 10^6 = 12,500,000

Where you will need it

Gas prices on Ethereum are quoted in gwei, while the fee is paid in ETH: a simple transfer uses 21,000 gas, so at 1 gwei it costs 21,000 gwei โ€” 0.000021 ETH. The Gas Fee Calculator does this for any transaction type. RPC and exchange APIs return balances in base units (a Solana balance of 2500000000 means 2.5 SOL). Smart-contract calls take token amounts as integers, and TRON energy and bandwidth costs are often expressed in sun.

Tokens are different from native coins: an ERC-20 or SPL token defines its own decimals. USDT and USDC use 6 decimals on most networks, while many other tokens use 18. Always check the token's decimals before converting a raw token amount โ€” this converter covers native coins.

Common mistakes

A few errors appear again and again in support chats:

  • Confusing gwei and wei โ€” a factor of one billion.
  • Treating a raw token amount as if it had 18 decimals when the token uses 6 (or the reverse).
  • Copying a rounded value from a block explorer instead of the exact one.
  • Forgetting that one Lightning millisatoshi is not a valid on-chain amount.

Reading raw values from explorers and APIs

Block explorers usually show both a formatted amount and the raw integer; APIs often return only the raw integer, sometimes as a string to avoid precision loss. When you copy such a value, paste it with the base unit selected (wei, lamport, sun, drop) and read the whole-coin value from the table. For Ethereum transactions, the value field is in wei, gas price in wei per gas (often displayed in gwei) and gas used is a plain count โ€” multiply gas used by the price per gas to get the fee in wei, then convert.

When writing code, keep amounts as integers or decimal strings end to end and convert only for display. Floating-point numbers in JavaScript keep about 15โ€“17 significant digits, which is not enough for an 18-decimal token balance.

Frequently asked questions

+How many wei are in 1 ETH?

10ยนโธ wei, i.e. 1,000,000,000,000,000,000. One gwei is 10โน wei, so 1 ETH = 1,000,000,000 gwei.

+How many lamports are in 1 SOL?

1,000,000,000 lamports (10โน).

+How many sun are in 1 TRX?

1,000,000 sun (10โถ). XRP uses the same factor: 1 XRP = 1,000,000 drops.

+Does the converter round values?

No. It uses exact integer arithmetic and refuses amounts smaller than the base unit.

+Can I convert ERC-20 token amounts?

This tool converts native coins. For a token, divide the raw amount by 10 to the power of the token's decimals (6 for USDT/USDC on most chains).

Calculations run entirely in your browser; nothing you type is sent to KOT.CASH. Results are estimates for information only and are not financial, tax or legal advice.

โ† All 33 crypto tools

Crypto Unit Converter โ€” Wei, Gwei, ETH, Lamports, Sun