---
title: "reverse function in Strata | Oplema"
description: "Reverse the characters in text, so that hello becomes olleh. A missing input gives a missing result. Use it in a Strata Formula or Filter."
url: "https://oplema.com/docs/strata/functions/reverse"
updated: "2026-11-04"
---

# reverse

Reverse the characters in text.

## Try an expression

In [Formula](https://oplema.com/docs/strata/prep/formula), enter the expression and set Output type to **VARCHAR**.

### Expression

```
reverse('hello')
```

### Result

```
'olleh'
```

To use your own data, replace the example values with column names. Keep format strings and other options as written.

Try it live in Formula

Result
| id | result |
| --- | --- |
| 1 | olleh |

## Arguments and types

```
reverse(string)
```

**string**

Text

Supported signatures (1)

```
reverse(string: VARCHAR) → VARCHAR
```

The result type can depend on the input types. See DuckDB for the full argument rules.

## Things to know

If the first argument is missing, the result is NULL.

## Related functions

[array\_extract

Get one item from a list or one character from text by position, where 1 is the first. For a struct, choose a field by name, or by position in an unnamed struct.

](https://oplema.com/docs/strata/functions/array-extract)[ascii

Return the Unicode number of the first character in text.

](https://oplema.com/docs/strata/functions/ascii)[bin

Converts the string to binary representation.

](https://oplema.com/docs/strata/functions/bin)[bit\_length

Number of bits in a string.

](https://oplema.com/docs/strata/functions/bit-length)

[Browse text](https://oplema.com/docs/strata/functions#text) [DuckDB documentation](https://duckdb.org/docs/current/sql/functions/text.html#reversestring)

Function metadata from DuckDB, used under the [MIT license](https://github.com/duckdb/duckdb/blob/v1.5.4/LICENSE).
