About Nostr keys
In simple terms
Your npub is your public Nostr identity. Share it freely. Your nsec is the master key that proves you are that identity. Every Nostr event is signed using cryptography. Anyone who gets your nsec can act as you, so never share it.
Store your nsec somewhere safe, such as a trusted password manager, and keep a separate offline backup in another secure location. If you lose every copy, there is no way to restore your identity.
Hex is simply another way of writing the same key.
- Convert changes how a key is written. Some Nostr clients ask for a key in hex, which is when this converter is useful.
- Generate creates a new random Nostr identity and its keys on this device.
- Mine keeps creating new identities until the public
npub has the pattern you requested. For example, you can search for leading q characters, leading zeros in the public hex key, or a memorable pattern such as npub1sunsun.... It cannot discover or steal somebody else's secret key.
Longer patterns take dramatically longer to find. The displayed time is an average, not a promise. For a real identity, download this page, inspect its source, disconnect from the internet, and run it offline.
Technical details
A Nostr secret key is a randomly selected 32-byte number in the valid secp256k1 scalar range. Its public key is calculated as P = kG. Nostr publishes the 32-byte x-only form of that public point.
NIP-19 encodes those raw 32 bytes with Bech32. The npub or nsec prefix identifies the key type, while the final six characters provide a checksum. This is encoding, not encryption. For an ambiguous 64-character hex value, the converter shows both possible interpretations.
Generation uses the browser's cryptographically secure crypto.getRandomValues. CPU mining runs in isolated Web Workers. GPU mining uses WebGPU and performs a known-vector self-test before accepting results; if that test or WebGPU availability fails, mining falls back to the CPU.
Prefix and suffix rules apply to the Bech32 data between npub1 and its checksum. Leading-zero rules apply to the public key in hexadecimal. Comma-separated choices are alternatives, while a prefix, suffix, and zero requirement used together must all match.
One Bech32 character adds roughly 32 times more work; one leading hexadecimal zero adds roughly 16 times more work. Search time follows probability, so a match may appear immediately or take far longer than the estimate.
Keys are not sent to satoshi.si or saved by this page, and secret results are cleared when you leave. Analytics and Synthetic Satoshi are disabled here. Anything you place on the clipboard remains your responsibility.