← All NIPs

NIP-84

Highlights

DraftEvents

Kind 9802 saves a passage you liked from an article, a web page or any other source, with a link back to where it came from and who wrote it.

At a glance

Status
In use and still allowed to change.
Kinds
Tags
  • p
Last changed
Sep 1, 2026

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 highlighted text, copied from the source. May be empty when the source is not text (audio, video).

Tags

  1. a Optional

    Address of the highlighted addressable event, such as an article (kind:pubkey:d-tag).

  2. e Optional

    Id of the exact event version that was highlighted.

  3. p Optional

    Someone involved with the highlighted material: its author, editor, or a person mentioned in the comment.

  4. context Optional

    The surrounding text, so readers understand the highlight.

Add tag

How this NIP works

Step 1 of 5

Pick the passage

The highlighted words go in content, exactly as they appear in the source. For audio or video highlights content can be empty.

In the course

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

Builds on

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 spec322 words, quoted from the repository at commit 0046368.

This NIP defines kind:9802, a "highlight" event, to signal content a user finds valuable.

Format

The .content of these events is the highlighted portion of the text.

.content might be empty for highlights of non-text based media (e.g. NIP-94 audio/video).

References

Events SHOULD tag the source of the highlight, whether nostr-native or not. The following tags may be used to indicate different types of content:

  • a and/or e tags for nostr events
  • i tags for structured sources per NIP 73
  • r tags for anything else (may contain a URL or text)

Attribution

Clients MAY include one or more p tags, tagging the original authors of the material being highlighted; this is particularly useful when highlighting non-nostr content for which the client might be able to get a nostr pubkey somehow (e.g. prompting the user or reading a <link rel="me" href="nostr:nprofile1..." /> tag on the document). A role MAY be included as the last value of the tag.

{
  "tags": [
    ["p", "<pubkey-hex>", "<relay-url>", "author"],
    ["p", "<pubkey-hex>", "<relay-url>", "author"],
    ["p", "<pubkey-hex>", "<relay-url>", "editor"]
  ],
  // other fields...
}

Context

Clients MAY include a context tag, useful when the highlight is a subset of a paragraph and displaying the surrounding content might be beneficial to give context to the highlight.

Quote Highlights

A comment tag may be added to create a quote highlight. This SHOULD be rendered like a quote repost with the highlight as the quoted note.

This is to prevent the creation of multiple notes (highlight + kind 1) for a single highlight action, which looks bad in micro-blogging clients where these notes may appear in succession.

p-tag mentions MUST have a mention attribute to distinguish it from authors and editors.

r-tag urls from the comment MUST have a mention attribute to distinguish from the highlighted source url. The source url MUST have the source attribute.