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

# sha1

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

## Try an expression

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

### Expression

```
sha1('🦆')
```

### Result

```
'949bf843dc338be348fb9525d1eb535d31241d76'
```

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 | 949bf843dc338be348fb9525d1eb535d31241d76 |

## Arguments and types

```
sha1(value)
```

**value**

Text

**blob**

Binary data

Supported signatures (2)

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

[sha256

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

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

Calculate a numeric hash of one or more values. It isn't a cryptographic hash, so don't use it for security.

](https://oplema.com/docs/strata/functions/hash)[md5

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

](https://oplema.com/docs/strata/functions/md5)[chr

Returns a character which corresponds to the ASCII code value or Unicode code point.

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

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

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