# Bytes.padRight

Pads a [`Bytes.Bytes`](/api/Bytes/types#bytes) value to the right 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.padRight(Bytes.from([1]), 4)
// @log: Uint8Array([1, 0, 0, 0])
```

## Definition

```ts
function padRight(
  value: Bytes,
  size?: number,
): padRight.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.

`padRight.ReturnType`
