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

# PersonalMessage.getSignPayload

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

Gets the payload to use for signing an [ERC-191 formatted](https://eips.ethereum.org/EIPS/eip-191#version-0x45-e) personal message.

## Imports

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

## Examples

```ts twoslash
// @noErrors
import { Hex, PersonalMessage, Secp256k1 } from 'viem/utils'

const payload = PersonalMessage.getSignPayload(
  Hex.fromString('hello world')
) // [!code focus]

const signature = Secp256k1.sign({
  payload,
  privateKey: '0x...'
})
```

## Definition

```ts
function getSignPayload(
  data: Hex.Hex | Bytes.Bytes,
): Hex.Hex
```

## Parameters

### data

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

The data to get the sign payload for.

## Return Type

The payload to use for signing.

`Hex.Hex`
