--- title: fromDecimal --- # fromDecimal Converts a number, or a string of numbers, into a hexadecimal string. ### Usage ```javascript TronWeb.fromDecimal(number); ``` ### Parameters | Parameter | Description | Data Type | | --------- | ---------------- | --------------------------- | | number | String or Number | Hexadecimal string / Number | ### Returns String - The converted hex string. ### Example ```javascript TronWeb.fromDecimal("12345678"); // output-start '0xbc614e' // output-end ```