> ## Documentation Index
> Fetch the complete documentation index at: https://baileys.wiki/llms.txt
> Use this file to discover all available pages before exploring further.

# jidEncode

> Function jidEncode in the Baileys API.

> **jidEncode**(`user`, `server`, `device`?, `agent`?): `string`

Defined in: [src/WABinary/jid-utils.ts:51](https://github.com/WhiskeySockets/Baileys/blob/master/src/WABinary/jid-utils.ts#L51)

## Parameters

### user

`null` | `string` | `number`

### server

[`JidServer`](/api-reference/type-aliases/JidServer)

### device?

`number`

### agent?

`number`

## Returns

`string`
