> ## Documentation Index
> Fetch the complete documentation index at: https://docs.firebolt.io/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.firebolt.io/feedback

```json
{
  "path": "/reference-sql/functions-reference/string/rpad",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

> Reference material for RPAD function

# RPAD

Adds a specified pad string to the end of the string repetitively up until the length of the resulting string is equivalent to an indicated length.

The similar function to pad the start of a string is [LPAD](/reference-sql/functions-reference/string/lpad).

## Syntax

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
RPAD(<expression>, <value>[, <pad>])
```

## Parameters

| Parameter      | Description                                                                                                                                                      | Supported input types |
| :------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------- | :-------------------- |
| `<expression>` | The original string. If the length of the original string is larger than the length parameter, this function removes the overflowing characters from the string. | `TEXT`                |
| `<value>`      | The integer length that the string will be after it has been left-padded.  A negative number returns an empty string.                                            | `INTEGER`             |
| `<pad>`        | The string to add to the end of the primary string `<expression`. If left blank, `<pad>` defaults to whitespace characters.                                      |                       |

## Example

The following statement adds the string "ABC" to the end of the string "Firebolt" repetitively until the resulting string is equivalent to 20 characters in length.

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT
	RPAD('Firebolt', 20, 'ABC');
```

**Returns**: `FireboltABCABCABCABC`
