---
title: "md5 function in Strata | Oplema"
description: "Calculate the MD5 hash of text or binary data, returned as a VARCHAR hex string. Write it as md5(string) in a Strata Formula or Filter."
url: "https://oplema.com/docs/strata/functions/md5"
updated: "2026-11-04"
---

# md5

Calculate the MD5 hash of text or binary data, returned as hexadecimal text.

## Try an expression

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

### Expression

```
md5('abc')
```

### Result

```
'900150983cd24fb0d6963f7d28e17f72'
```

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 | 900150983cd24fb0d6963f7d28e17f72 |

## Arguments and types

```
md5(string)
```

**string**

Text

**blob**

Binary data

Supported signatures (2)

```
md5(blob: BLOB) → VARCHAR
md5(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

[md5\_number

Return the MD5 hash of text or binary data as a UHUGEINT number.

](https://oplema.com/docs/strata/functions/md5-number)[sha1

Returns a VARCHAR with the SHA-1 hash of the value.

](https://oplema.com/docs/strata/functions/sha1)[sha256

Calculate the SHA-256 hash of text or binary data, returned as hexadecimal text.

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

Return the Unicode number of the first character in text.

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

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

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