> **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.padRight

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

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

## Imports

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

## Examples

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

Bytes.padRight(Bytes.from([1]), 4)
// @log: Uint8Array([1, 0, 0, 0])
```

## Definition

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

## Parameters

### value

* **Type:** `Bytes`

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

### size

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

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

## Return Type

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

`padRight.ReturnType`
