# Mnemonic.toSeed

Converts a mnemonic to a master seed.

## Imports

:::code-group
```ts [Named]
import { Mnemonic } from 'ox'
```

```ts [Entrypoint]
import * as Mnemonic from 'ox/Mnemonic'
```
:::

## Examples

```ts twoslash
import { Mnemonic } from 'ox'

const mnemonic = Mnemonic.random(Mnemonic.english)
const seed = Mnemonic.toSeed(mnemonic)
// @log: Uint8Array [...64 bytes]
```

## Definition

```ts
function toSeed<as>(
  mnemonic: string,
  options?: toSeed.Options<as>,
): toSeed.ReturnType<as>
```

**Source:** [src/core/Mnemonic.ts](https://github.com/wevm/ox/blob/main/src/core/Mnemonic.ts#L232)

## Parameters

### mnemonic

* **Type:** `string`

The mnemonic to convert.

### options

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

Conversion options.

#### options.as

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

The output format.

#### options.passphrase

* **Type:** `string`
* **Optional**

An optional passphrase for additional protection to the seed.

## Return Type

The master seed.

`toSeed.ReturnType<as>`
