# Rlp.toBytes

Decodes a Recursive-Length Prefix (RLP) value into a [`Bytes.Bytes`](/api/Bytes/types#bytes) 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.toBytes('0x8b68656c6c6f20776f726c64')
// Uint8Array([139, 104, 101, 108, 108, 111,  32, 119, 111, 114, 108, 100])
```

## Definition

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

**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 [`Bytes.Bytes`](/api/Bytes/types#bytes) value.

`RecursiveArray<Bytes.Bytes>`
