# Bytes.size

Retrieves the size of a [`Bytes.Bytes`](/api/Bytes/types#bytes) value.

## Imports

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

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

## Examples

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

Bytes.size(Bytes.from([1, 2, 3, 4]))
// @log: 4
```

## Definition

```ts
function size(
  value: Bytes,
): number
```

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

## Parameters

### value

* **Type:** `Bytes`

[`Bytes.Bytes`](/api/Bytes/types#bytes) value.

## Return Type

Size of the [`Bytes.Bytes`](/api/Bytes/types#bytes) value.

`number`
