← All NIPs

NIP-36

Sensitive Content

DraftEvents

Add a content-warning tag, with an optional reason, and clients hide the event behind a "show anyway" button until the reader chooses to see it.

At a glance

Status
In use and still allowed to change.
Tags
  • content-warning
  • l
  • L
  • t
Last changed
Nov 18, 2023

Try it

Edit the form or the JSON: both stay in sync, the badge says whether the result is valid, and tapping any field explains it.

Examples
Valid 1 note

Not signed yet · Demo keys only. These personas' secret keys are public on purpose.

Form
Jan 1, 2025, 12:00 AM UTC

Content

The sensitive content itself, in clear text.

Tags

  1. content-warning Required

    Asks clients to hide the content until the reader chooses to show it.

Add tag

How this NIP works

Step 1 of 3

Add a content-warning tag

The author adds ["content-warning"] or ["content-warning", "<reason>"] to any event whose content readers might not want to see by surprise.

In the course

No course chapter covers this NIP yet. The editor above is the quickest way in.

See also

Specification

Specification text is quoted in English from the nostr-protocol/nips repository. Our explanations and the interface are translated. Source on GitHub at commit 0046368

Read the spec113 words, quoted from the repository at commit 0046368.

The content-warning tag enables users to specify if the event's content needs to be approved by readers to be shown. Clients can hide the content until the user acts on it.

l and L tags MAY be also be used as defined in NIP-32 with the content-warning or other namespace to support further qualification and querying.

Spec
tag: content-warning
options:
 - [reason]: optional
Example
{
  "pubkey": "<pub-key>",
  "created_at": 1000000000,
  "kind": 1,
  "tags": [
    ["t", "hastag"],
    ["L", "content-warning"],
    ["l", "reason", "content-warning"],
    ["L", "social.nos.ontology"],
    ["l", "NS-nud", "social.nos.ontology"],
    ["content-warning", "<optional reason>"]
  ],
  "content": "sensitive content with #hastag\n",
  "id": "<event-id>"
}