> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://help.sigmacomputing.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://help.sigmacomputing.com/_mcp/server.

# SHA256

> The SHA256 (Secure Hash Algorithm 256-bit) function is a cryptographic hash function that transforms text input into a 256-bit hash value.

The **SHA256** (Secure Hash Algorithm 256-bit) function is a <a href="https://en.wikipedia.org/wiki/Cryptographic_hash_function" target="_blank">cryptographic hash function</a> that transforms text input into a 256-bit hash value.

There is no corresponding decryption function for **SHA256**. Do not use this function to encrypt text that later needs to be decrypted.

This function isn't compatible with all data platform connections. To check if your connection supports it, see [Supported data platforms and feature compatibility](/docs/region-warehouse-and-feature-support#supported-data-platforms-and-feature-compatibility).

## Syntax

```
SHA256(string)
```

Function arguments:

|            |                              |
| :--------- | :--------------------------- |
| **string** | The text value to be hashed. |

## Examples

In this example, you have a table with a User ID column. For privacy and confidentiality reasons, you might want to obfuscate the actual values in this column. You can use the **SHA256** function to do so:

```
SHA256([User ID])
```

The function returns 256-bit hash values of each User ID.

![Two column table, one column containing User IDs, the second column containing the SHA256 of each User ID.](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/sigma.docs.buildwithfern.com/3df44687aee92e7060832608a0376b0cf49766cd447204f963dc94f28b5f6e1d/assets/docs-images/29c3d956e38fa5abae80ff59d91962f6c8f59efc88e7b9e75bacb38fcb1b094f-sha256_example.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260726%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260726T180820Z&X-Amz-Expires=604800&X-Amz-Signature=8fbe23e9dffe717e83633924baea2b2e53772707a8ceda32abe9e6c9cfd98869&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)