> ## 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.

> Reference material for MD5 function

# MD5

Calculates the MD5 hash of string, returning the result as a string in hexadecimal.

## Syntax

```sql theme={"theme":{"light":"css-variables","dark":"css-variables"}}
MD5(<expression>)
```

## Parameters

| Parameter      | Description         | Supported input types |
| :------------- | :------------------ | :-------------------- |
| `<expression>` | The string to hash. | `TEXT`                |

## Return Types

* Returns `TEXT` with string input
* Returns `NULL` if input is `NULL`

## Example

The following example returns the username `esimpson` in hexadecimal:

<div className="query-window">
  ```
  SELECT MD5('esimpson') AS username;
  ```

  | username <span>text</span>       |
  | :------------------------------- |
  | c14fa496dfd5ebbb08aaca16a7c2781b |

  <p><span>Rows: 1</span><span>Execution time: 5.77ms</span></p>
</div>
