npub ↔ hex converter
Convert a Nostr public key between npub and hex, or decode a note, nevent, nprofile or naddr. Results appear as you paste.
npub vs hex: what’s the difference?
They are the same public key written two ways. Hex is the raw 32-byte key as 64 characters (0–9, a–f), which is what Nostr events actually contain. npub is the same bytes encoded with bech32 (NIP-19), with a prefix that tells you what it is and a checksum that catches typos. Apps show npubs to people and use hex internally.
The other formats
- note — an event id (a single post) in bech32.
- nevent — an event id plus optional relay hints, author and kind.
- nprofile — a public key plus relay hints.
- naddr — a pointer to a replaceable event such as a long-form article, made of kind + author + identifier.
- nsec — a private key. Never share or paste it anywhere; this tool won’t touch it.
Want to see who a key belongs to? Try the Nostr profile lookup.