# Int to Hex

> Convert an integer to a hexadecimal number.

- ID: `int_to_hex`
- Type: Block
- Category: [Math](https://inventor.bot/docs/reference/blocks/math.md)

- Value block: it can be used directly inside expressions, e.g. `"Result: " + int_to_hex(Args{...})`.

**Inputs**

| Name | Required | Description | Value |
| --- | --- | --- | --- |
| `integer` | yes | Integer to convert. | e.g. `"42"` |

**Outputs**

| Name | Description | Value |
| --- | --- | --- |
| `hexadecimal_number` | Converted hexadecimal value. | e.g. `"2a"` |

**Example**

```go
intToHex := int_to_hex(Args{integer: 42})
send_text_message(Args{
	channel_id:      trigger.channel_id,
	message_content: "Hexadecimal Number: " + intToHex,
})
```