# Hex.size

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

## Imports

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

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

## Examples

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

Hex.size('0xdeadbeef')
// @log: 4
```

## Definition

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

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

## Parameters

### value

* **Type:** `Hex`

The [`Hex.Hex`](/api/Hex/types#hex) value to get the size of.

## Return Type

The size of the [`Hex.Hex`](/api/Hex/types#hex) value (in bytes).

`number`
