# Bytes.padLeft

Pads a [`Bytes.Bytes`](/api/Bytes/types#bytes) value to the left with zero bytes until it reaches the given `size` (default: 32 bytes).

## 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.padLeft(Bytes.from([1]), 4)
// @log: Uint8Array([0, 0, 0, 1])
```

## Definition

```ts
function padLeft(
  value: Bytes,
  size?: number,
): padLeft.ReturnType
```

**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 to pad.

### size

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

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

## Return Type

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

`padLeft.ReturnType`
