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

# Siwe.parseMessage

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

[EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message into message fields object.

## Imports

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

## Examples

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

Siwe.parseMessage(`example.com wants you to sign in with your Ethereum account:
0xA0Cf798816D4b9b9866b5330EEa46a18382f251e

I accept the ExampleOrg Terms of Service: https://example.com/tos

URI: https://example.com/path
Version: 1
Chain ID: 1
Nonce: foobarbaz
Issued At: 2023-02-01T00:00:00.000Z`)
// @log: {
// @log:   address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
// @log:   chainId: 1,
// @log:   domain: 'example.com',
// @log:   issuedAt: '2023-02-01T00:00:00.000Z',
// @log:   nonce: 'foobarbaz',
// @log:   statement: 'I accept the ExampleOrg Terms of Service: https://example.com/tos',
// @log:   uri: 'https://example.com/path',
// @log:   version: '1',
// @log: }
```

## Definition

```ts
function parseMessage(
  message: string,
): ExactPartial<Message>
```

## Parameters

### message

* **Type:** `string`

[EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message.

## Return Type

Message fields object.

`ExactPartial<Message>`
