# Rlp.toHex

Decodes a Recursive-Length Prefix (RLP) value into a [`Hex.Hex`](/api/Hex/types#hex) value.

## Imports

:::code-group
```ts [Named]
import { Rlp } from 'ox'
```

```ts [Entrypoint]
import * as Rlp from 'ox/Rlp'
```
:::

## Examples

```ts twoslash
import { Rlp } from 'ox'
Rlp.toHex('0x8b68656c6c6f20776f726c64')
// 0x68656c6c6f20776f726c64
```

## Definition

```ts
function toHex(
  value: Bytes.Bytes | Hex.Hex,
): RecursiveArray<Hex.Hex>
```

**Source:** [src/core/Rlp.ts](https://github.com/wevm/ox/blob/main/src/core/Rlp.ts#L709)

## Parameters

### value

* **Type:** `Bytes.Bytes | Hex.Hex`

The value to decode.

## Return Type

The decoded [`Hex.Hex`](/api/Hex/types#hex) value.

`RecursiveArray<Hex.Hex>`
