Wat is VAPID Key Generator?
VAPID (Voluntary Application Server Identification) is part of the Web Push Protocol. It uses a public/private key pair to identify your application server to push services (like Google's FCM or Mozilla's autopush). The public key is sent to the browser during push subscription. The private key stays on your server and signs push messages. Together they prove the push message comes from your server and not an impersonator.
Snel antwoord
Generate a VAPID key pair for Web Push notifications. The public key goes in your frontend JavaScript for pushManager.subscribe(). The private key stays on your server and is used with the web-push library or Firebase to sign push messages. Never expose the private key.
Beperkingen
- Keys generated in the browser are only as secure as the browser environment. For production use, consider generating keys server-side with OpenSSL and storing the private key in a secure secrets manager.
- The Web Crypto API requires a secure context (HTTPS or localhost). If the browser does not support Web Crypto, the tool cannot generate keys.
- VAPID keys use the P-256 (prime256v1) curve. Some older push libraries expect different formats — always verify the format expected by your specific push service or library.
Zo gebruik je deze tool
- Click the Generate Key Pair button to create a new P-256 key pair using your browser's Web Crypto API.
- Copy the public key into your frontend JavaScript where you call pushManager.subscribe().
- Copy the private key into your server environment variables and use it with the web-push library or Firebase.
- Never expose the private key — it stays on your server and is used to sign push messages.
Waarvoor je het kunt gebruiken
- Generate a VAPID key pair for adding web push notifications to a web app.
- Replace an accidentally exposed VAPID key pair with a fresh one.
- Set up push notifications with the web-push npm library, Firebase Cloud Messaging, or a custom push server.