← Todos los NIPs

NIP-21

Esquema de URI nostr:

BorradorCodificación

Pon "nostr:" delante de un código NIP-19 (npub, nprofile, note, nevent, naddr) y obtienes un enlace que cualquier app de Nostr puede abrir, dentro de notas, en páginas web o en códigos QR.

De un vistazo

Estado
En uso, pero todavía puede cambiar.
Último cambio
21 mar 2026

Pruébalo

Edita el formulario o el JSON: ambos se mantienen sincronizados, la insignia indica si el resultado es válido y, al tocar cualquier campo, se explica qué hace.

Ejemplos
Válido

Formulario

Convierte un código NIP-19 en un enlace clicable que entiende cualquier cliente de Nostr o manejador del sistema operativo.

Entradas

Un código NIP-19: npub, nprofile, note, nevent o naddr. nsec no está permitido.

Pega aquí una cadena codificada para descodificarla en las entradas.

El resultado es "nostr:" seguido del código sin cambios. Decodificar es lo inverso: quita "nostr:" y decodifica la parte NIP-19.

Qué lleva dentro

nostr:npub1u4gvd6fgpre4swpt0wxpgdzngn67lx3fj55cxnguym2hk6kwgnxqta308g

Esquema de URI
nostr:
Prefijo (qué es)
npub
Separador
1
Datos
u4gvd6fgpre4swpt0wxp…ym2hk6kwgnxq
Suma de control
ta308g

Cómo funciona este NIP

Paso 1 de 5

Parte de un código NIP-19

Elige a qué quieres apuntar: un perfil (npub, nprofile), una nota (note, nevent) o un evento direccionable como un artículo (naddr).

En el curso

Ningún capítulo del curso cubre este NIP todavía. El editor de arriba es la forma más rápida de empezar.

Se basa en

Ver también

Especificación

El texto de las especificaciones se cita en inglés del repositorio nostr-protocol/nips. Nuestras explicaciones y la interfaz están traducidas. Código fuente en GitHub en el commit 0046368

Leer la especificación154 palabras, citadas del repositorio en el commit 0046368.

This NIP standardizes the usage of a common URI scheme for maximum interoperability and openness in the network.

The scheme is nostr:.

The identifiers that come after are expected to be the same as those defined in NIP-19 (except nsec).

Examples
  • nostr:npub1sn0wdenkukak0d9dfczzeacvhkrgz92ak56egt7vdgzn8pv2wfqqhrjdv9
  • nostr:nprofile1qqsrhuxx8l9ex335q7he0f09aej04zpazpl0ne2cgukyawd24mayt8gpp4mhxue69uhhytnc9e3k7mgpz4mhxue69uhkg6nzv9ejuumpv34kytnrdaksjlyr9p
  • nostr:nevent1qqstna2yrezu5wghjvswqqculvvwxsrcvu7uc0f78gan4xqhvz49d9spr3mhxue69uhkummnw3ez6un9d3shjtn4de6x2argwghx6egpr4mhxue69uhkummnw3ez6ur4vgh8wetvd3hhyer9wghxuet5nxnepm

Linking HTML pages to Nostr entities

<link> tags with rel="alternate" can be used to associate webpages to Nostr events, in cases where the same content is served via the two mediums (for example, a web server that exposes Markdown articles both as HTML pages and as kind:30023 events served under itself as a relay or through some other relay). For example:

<head>
  <link rel="alternate" href="nostr:naddr1qqyrzwrxvc6ngvfkqyghwumn8ghj7enfv96x5ctx9e3k7mgzyqalp33lewf5vdq847t6te0wvnags0gs0mu72kz8938tn24wlfze6qcyqqq823cph95ag" />
</head>

Likewise, <link> tags with rel="me" or rel="author" can be used to assign authorship of webpages to Nostr profiles. For example:

<head>
  <link rel="me" href="nostr:nprofile1qyxhwumn8ghj7mn0wvhxcmmvqyd8wumn8ghj7un9d3shjtnhv4ehgetjde38gcewvdhk6qpq80cvv07tjdrrgpa0j7j7tmnyl2yr6yr7l8j4s3evf6u64th6gkwswpnfsn" />
</head>