Skip to content

Nostr Key Generator

See what a Nostr key pair actually is. This page makes a real npub and nsec on your own device and sends nothing to any server, so you can look at one before you own one.

Making an identity you intend to keep? Let a client or a signer extension generate it instead. This page leaks nothing. But a key that has been shown in a browser tab has been somewhere a key held by a signer never goes.

Runs locally in your browser No email, no phone number Works with every Nostr client

Generate Your Nostr Keys

Create a secure key pair to access Nostr. Your keys are generated locally in your browser and never sent to any server.

Part of the free Nostr tools collection.

How it works

The generator uses in-browser cryptography (the open-source nostr-tools library, the same one most Nostr apps are built on) to create a random secp256k1 key pair on your device. Two values come out:

  • npub is your public key, your identity on Nostr. Share it so people can find and follow you.
  • nsec is your secret key. It signs everything you publish and is your account. Whoever holds it controls the identity, so nobody should ever see it but you.

There is no registration step, because Nostr has no central server to register with. A key pair is the whole account. It is also why the safest key is one you never see: a client or a signer extension can generate it, hold it and sign with it without ever putting it on a screen. This page puts one on a screen on purpose, because that is the only way to show you what one is.

Before you close this tab

  • Your keys never leave this page. They are generated and displayed locally. Nothing reaches our servers, and we could not recover your key for you even if you asked.
  • Save the nsec offline, now. Paper or a password manager both work. Lose the nsec and the account goes with it. There is no reset and no recovery, by design.
  • Never share or paste the nsec anywhere except into a Nostr client you trust, or better, a signer extension. The npub is the one made for sharing.

Frequently asked questions

Security

Should I use this to create my real Nostr account?

Use it to see what a key pair looks like. For an identity you intend to keep, let a client (Damus, Amethyst, Primal) or a signer extension (Alby, nos2x) generate the key instead. Not because this page is unsafe: the keys are made on your device by nostr-tools, the library most clients are built on, and nothing is sent anywhere. Load the page, pull the plug on your internet, and it still works. The difference is that a key made inside a signer never has to appear on a screen or pass through a clipboard. This one does both, and each of those is somewhere a key can be captured.

Security

Are the keys this page makes real?

Completely. It is a genuine secp256k1 key pair and any Nostr client will accept it. Showing a real one is the point, because a fake example teaches you nothing. It also means the nsec on your screen is a live secret from the moment it appears, not a sample. Treat it that way.

Security

What is the difference between npub and nsec?

The npub is your public key. It is your identity on Nostr and your address there, so share it freely and people can find you. The nsec is your secret key. It signs everything you publish and it IS your account. Never share it, and never paste it into a website you do not trust. If the npub is your username, the nsec is a password that can never be changed.

Security

What happens if I lose my nsec?

The account is gone, permanently. No company runs Nostr, so nobody can reset a password or send you a recovery email. That is the price of an identity nobody can take away from you. Write the nsec down offline the moment you generate it, on paper or in a password manager, and keep a second copy somewhere safe.

Want the full picture first? Read the keys & security guide.