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

# Address.assert

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

Asserts that the given value is a valid [`Address.Address`](/docs/utilities/address/types#address).

## Imports

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

## Examples

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

Address.assert('0xA0Cf798816D4b9b9866b5330EEa46a18382f251e')
```

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

Address.assert('0xdeadbeef')
// @error: InvalidAddressError: Address "0xdeadbeef" is invalid.
```

## Definition

```ts
function assert(
  value: string,
  options?: assert.Options,
): asserts value is Address
```

## Parameters

### value

* **Type:** `string`

Value to assert if it is a valid address.

### options

* **Type:** `assert.Options`
* **Optional**

Assertion options.

#### options.strict

* **Type:** `boolean`
* **Optional**

Enables strict mode. Whether or not to compare the address against its checksum.
