# Bytes.toString

Decodes a [`Bytes.Bytes`](/api/Bytes/types#bytes) into a string.

## Imports

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

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

## Examples

```ts twoslash
import { Bytes } from 'ox'

const data = Bytes.toString(
  Bytes.from([
    72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33
  ])
)
// @log: 'Hello world'
```

## Definition

```ts
function toString(
  bytes: Bytes,
  options?: toString.Options,
): string
```

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

## Parameters

### bytes

* **Type:** `Bytes`

The [`Bytes.Bytes`](/api/Bytes/types#bytes) to decode.

### options

* **Type:** `toString.Options`
* **Optional**

Options.

#### options.size

* **Type:** `number`
* **Optional**

Size of the bytes.

## Return Type

Decoded string.

`string`
