JWT key generator

Generate RSA (2048, 3072, 4096-bit) and EC (P-256, P-384, P-521) key pairs and HMAC secrets for signing JWTs. Export PEM, JWK and a ready-to-publish JWKS, or convert existing keys between PEM and JWK.

🔒 Keys are generated with WebCrypto and never leave your browser.

Key pair (RS / PS / ES)

Generated with WebCrypto in your browser. The JWKS contains only the public key; kid is the RFC 7638 thumbprint.

HMAC secret (HS256 / 384 / 512)

PEM ↔ JWK converter

Which key do I need?

Key IDs

Each generated key gets a kid equal to its RFC 7638 JWK thumbprint — a SHA-256 hash of the key's required public members. It is stable, unique and verifiable, which makes key rotation straightforward: add the new key to your JWKS, start signing with its kid, and remove the old key once its tokens have expired.

Handling private keys

Keys generated here exist only in this browser tab until you copy or download them. For production, generate keys inside your key management system (KMS, HSM or secrets manager) so the private key never exists outside it. Use this page for development, testing and learning.

Next: sign a token with your new key or read how to sign a JWT.