Coin Formatter
No rounding
Converter
Formatting rules
  • 1 Remove trailing zeros after the decimal point
    2.1200 → 2.12
  • 2 Amounts below 0.00000001 show as 0.00
    0.000000001 → 0.00
  • 3 Amounts below 0.01 keep up to 8 decimals
    0.00000001 → 0.00000001
  • 4 BTC and ETH: at least 2, at most 6 decimals
    0.12345678 → 0.123456  |  0.1 → 0.10
  • 5 All other currencies: 2 decimals
    0.12345678 → 0.12  |  0.1 → 0.10
  • 6 Extra decimals are cut off, never rounded
    USDT 0.128 → 0.12
  • 7 Negative amounts: format the number, then add the minus sign
    USDT -0.1280 → -0.12

How to format a crypto amount for display

Pick the currency, paste the raw amount (for example from an API, a database or a blockchain explorer) and click Format Amount or press Enter. The result follows the seven rules above: trailing zeros go away, the number of decimals depends on the currency and on the size of the amount, and extra digits are cut off instead of rounded.

The tool works on the digits as text, so long values such as 12345678901.123456789 stay exact. Commas used as thousands separators are ignored.

Examples

CurrencyRaw amountShown asWhy
BTC0.500000000.50Trailing zeros removed, minimum 2 decimals
BTC1.234567891.234567Maximum 6 decimals, the 7th and 8th are cut off
ETH33.00Whole numbers get 2 decimals
USDT99.99999.99Cut off, not rounded up to 100.00
USDT0.00420.0042Below 0.01, so small amounts stay visible
USD-12.3456-12.34Sign is added after formatting

Truncate decimals without rounding in JavaScript

If you build the same rule into your own app, avoid toFixed() (it rounds) and avoid floating-point math (it is not exact). Cut the decimal string instead:

function truncateDecimals(value, max) {
  const [int, frac = ''] = String(value).split('.');
  const cut = frac.slice(0, max).replace(/0+$/, '');
  return cut ? int + '.' + cut : int;
}

truncateDecimals('0.128', 2);       // "0.12"
truncateDecimals('1.23456789', 6);  // "1.234567"

For math on money (adding, multiplying), use integers in the smallest unit (cents, satoshis, wei) or a decimal library such as big.js or decimal.js.

Frequently asked questions

Why truncate instead of rounding?

Rounding can show more money than really exists. A balance of 0.128 USDT rounded to two decimals shows 0.13, but the user cannot withdraw 0.13. Cutting off the extra digits (truncating) always shows an amount the user really has, so wallets and exchanges usually truncate balances.

How many decimals does each cryptocurrency have?

On the blockchain, Bitcoin has 8 decimals (1 satoshi = 0.00000001 BTC), Ether has 18 (1 wei = 0.000000000000000001 ETH) and USDT has 6 on most networks. Apps rarely show all of them: this formatter shows 2 to 6 decimals for BTC and ETH and 2 for everything else, and up to 8 for very small amounts.

Why does a small amount keep more decimals?

With only 2 decimals, 0.005 USDT would show as 0.00 and look like nothing. So amounts below 0.01 keep up to 8 decimals, and only amounts below 0.00000001 (one satoshi) show as 0.00.

Is this formatter the same as Intl.NumberFormat?

No. Intl.NumberFormat in JavaScript rounds ("half expand" by default) and adds currency symbols and thousands separators. This tool truncates and returns a plain number string, which is what you usually store in a database or send to an API. Use Intl.NumberFormat afterwards if you need a symbol and local separators.

Why not just use toFixed()?

Number.prototype.toFixed() rounds, and it works on binary floating-point numbers, so (1.005).toFixed(2) gives "1.00" and large amounts lose precision. This tool works on the digits as text, so the result is exact for any length.

Related tools