> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://v3.viem.sh/api/mcp` to find what you need.

# Bytes.size

:::info
`Bytes.size` is a re-export of ox's [`Bytes.size`](https://oxlib.sh/api/Bytes/size). Refer to the ox documentation for the full reference.
:::

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

## Imports

```ts
import { Bytes } from 'viem/utils'
```

## Examples

```ts twoslash
// @noErrors
import { Bytes } from 'viem/utils'

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

## Definition

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

## Parameters

### value

* **Type:** `Bytes`

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

## Return Type

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

`number`
