Nostr: What do `npub` and `nsec` mean?

`npub` is a human-readable encoding of a Nostr public key, suitable for sharing.

Short answer

npub is a human-readable encoding of a Nostr public key, suitable for sharing. nsec encodes the private key and should be treated like a secret, never posted or entered into an untrusted site. NIP-19 defines these display formats; the underlying protocol uses the key data in other encodings. A screenshot containing your nsec can be enough to compromise your identity.

Sources

NIP-19: Human-readable encodings.