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

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

# HEX_PARSE

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

Converts hexadecimal text into the text or data it represents

**Categories:** Data Parsing/Conversion

## Syntax

```
HEX_PARSE(hex_text, [error_on_invalid_hex: FALSE])
```

## Examples

### Example 1

Input:

```json
{
  "my_action": {
    "text_hex": "546869732069732061207069656365206F662074657874"
  }
}
```

Formula:

```
HEX_PARSE(my_action.text_hex)
```

Output:

```json
"This is a piece of text"
```

### Example 2

Input:

```json
{
  "my_action": {
    "binary_hex": "d21a261f4693f566e5bd71ebae94e5b2"
  }
}
```

Formula:

```
HEX_PARSE(my_action.binary_hex)
```

Output:

```json
"(binary data which can't be represented as text)"
```

### Example 3

Input:

```json
{
  "my_action": {
    "text_hex": "xyz fedcba9876543210"
  }
}
```

Formula:

```
HEX_PARSE(my_action.text_hex, error_on_invalid_hex: TRUE)
```

Output:

```json
"Invalid argument to HEX_PARSE, expected hexadecimal string got xyz fedcba9876543210"
```
