> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://v3.viem.sh/api/mcp` to find what you need.

# Hash.blake3

:::info
`Hash.blake3` is a re-export of ox's [`Hash.blake3`](https://oxlib.sh/api/Hash/blake3). Refer to the ox documentation for the full reference.
:::

Calculates the [BLAKE3](https://github.com/BLAKE3-team/BLAKE3) hash of a [`Bytes.Bytes`](/docs/utilities/bytes/types#bytes) or [`Hex.Hex`](/docs/utilities/hex/types#hex) value.

Backed by `blake3` from [`@noble/hashes`](https://github.com/paulmillr/noble-hashes), an audited & minimal JS hashing library, unless another implementation is installed with [`Engine.set`](https://oxlib.sh/api/Engine/set).

## Imports

```ts
import { Hash } from 'viem/utils'
```

## Examples

```ts twoslash
// @noErrors
import { Hash } from 'viem/utils'

Hash.blake3('0xdeadbeef')
// @log: '0x53147f3ce49ed4f60dfa5b9654c36ba6103c11f5737df3dabd4cbd296c4161bd'
```

### Configure Return Type

```ts twoslash
// @noErrors
import { Hash } from 'viem/utils'

Hash.blake3('0xdeadbeef', { as: 'Bytes' })
// @log: Uint8Array [...]
```

## Definition

```ts
function blake3<value, as>(
  value: value | Hex.Hex | Bytes.Bytes,
  options?: blake3.Options<as>,
): blake3.ReturnType<as>
```

## Parameters

### value

* **Type:** `value | Hex.Hex | Bytes.Bytes`

[`Bytes.Bytes`](/docs/utilities/bytes/types#bytes) or [`Hex.Hex`](/docs/utilities/hex/types#hex) value.

### options

* **Type:** `blake3.Options<as>`
* **Optional**

Options.

#### options.as

* **Type:** `"Bytes" | "Hex" | as`
* **Optional**

The return type. Defaults to the input format.

## Return Type

BLAKE3 hash.

`blake3.ReturnType<as>`
