# Mnemonic.random

Generates a random mnemonic.

## 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)
// @log: 'buyer zoo end danger ice capable shrug naive twist relief mass bonus'
```

## Definition

```ts
function random(
  wordlist: string[],
  options?: random.Options,
): string
```

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

## Parameters

### wordlist

* **Type:** `string[]`

The wordlist to use.

### options

* **Type:** `random.Options`
* **Optional**

Generation options.

#### options.strength

* **Type:** `number`
* **Optional**

The strength of the mnemonic to generate, in bits.

## Return Type

The mnemonic.

`string`
