# Hex.padRight

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

## Imports

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

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

## Examples

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

Hex.padRight('0x1234', 4)
// @log: '0x12340000'
```

## Definition

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

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

### size

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

The size (in bytes) of the output hex value.

## Return Type

The padded [`Hex.Hex`](/api/Hex/types#hex) value.

`padRight.ReturnType`
