# nip04.decrypt

**Method**

```javascript
async function nip04.decrypt(pubkey: string, message: string): string;
```

**Response**

Returns decrypted message

**Code Example**

```javascript
const message = "Secret message";
const encrypted = await window.nostr.nip04.encrypt(pubkey, message);
const decrypted = await window.nostr.nip04.decrypt(pubkey, encrypted); // Secret message
```
