---
title: TO_HEX
url: https://www.tines.com/docs/formulas/functions/to-hex/
kind: formula-function
---

*[tines.com](https://www.tines.com/llms.txt) › [Docs](https://www.tines.com/docs/llms.txt) › [Formulas](https://www.tines.com/llm/docs/formulas.md) › [Functions](https://www.tines.com/llm/docs/formulas/functions.md)*

# TO_HEX

*[View on tines.com](https://www.tines.com/docs/formulas/functions/to-hex/)*

Converts text or data into hexadecimal text.

**Categories:** Data Parsing/Conversion

## Syntax

```
TO_HEX(text)
```

## Examples

### Example 1

Input:

```json
{
  "my_action": {
    "text_data": "This is a piece of text"
  }
}
```

Formula:

```
TO_HEX(my_action.text_data)
```

Output:

```json
"546869732069732061207069656365206f662074657874"
```

### Example 2

Input:

```json
{
  "my_action": {
    "base64_binary_data": "Jvgw8kqvWFd2N7BTKFn4xA=="
  }
}
```

Formula:

```
TO_HEX(BASE64_DECODE(my_action.base64_binary_data))
```

Output:

```json
"26f830f24aaf58577637b0532859f8c4"
```
