What is a sun to TRX converter?
A sun to TRX converter divides an integer sun count by 106 to express it in TRX and multiplies by 106 to go back. Sun is the smallest unit of Tron's native token: every amount in a TransferContract, every balance returned by a node and every fee figure in a transaction receipt is an integer in sun, and TRX with 6 decimals is the wallet display.
Tron units table
| Unit | Sun | TRX |
|---|---|---|
| sun | 1 | 0.000001 |
| TRX | 1,000,000 | 1 |
Examples
- A TronGrid balance of
2500000000sun is 2,500 TRX. - Sending 0.5 TRX means
amount: 500000in aTransferContract. - Freezing 1,000 TRX for energy is
frozen_balance: 1000000000.
Worked example
A TronGrid account query returns "balance": 1234567890. Dividing by 1,000,000 gives 1,234.56789 TRX. A transaction receipt listing "fee": 345000 cost 0.345 TRX. To send 12.5 TRX you build a TransferContract with amount: 12500000. Because 106 is small, floating point rarely loses precision here, but mixing sun and TRX in the same calculation is the usual source of amounts that are a million times too large or too small.
Smallest units across chains
| Chain | Smallest unit | Units per coin | Decimals |
|---|---|---|---|
| Tron | sun | 1,000,000 | 6 |
| Bitcoin | satoshi | 100,000,000 | 8 |
| Solana | lamport | 1,000,000,000 | 9 |
| Ethereum | wei | 1018 | 18 |
Common mistakes
- Treating a TRC-20 amount as sun. USDT on Tron also uses 6 decimals, so the raw numbers look identical, but they are token units in the USDT contract, not TRX.
- Setting fee_limit in TRX. The
fee_limitfield of a smart-contract call is in sun; 100 TRX must be written as 100000000. - Off-by-a-million amounts. Passing 1 when you meant 1 TRX sends 1 sun. Always convert before building the transaction.
Related tools
Convert a T… address to hex for API calls with the Tron address converter, or generate a receiving code with the USDT TRC-20 QR generator.