SSOGEN / Free tools / JWK Generator: Create Keys, a JWKS and PEM in Your Browser
Free tool
JWK Generator: Create Keys, a JWKS and PEM in Your Browser
A JWK generator creates a cryptographic key in JSON Web Key format, the format used to sign and verify JSON Web Tokens. Choose the key type, size and algorithm below; the keys are made in your browser and never leave it.
Generate a key here
Pick a key type, a use and an algorithm, then select Generate key.
Select Add another key to the set to build a JWKS with several keys, for example to practise a key rotation. To see a result first, select Fill in an Acme example.
Private by design. Keys are generated in this page with the Web Crypto API and never leave it: nothing is uploaded or stored. Use the keys for tests; for production, generate keys where they will be used and keep the private JWK in a secret store.
Free, in your browser: no sign-up, no upload and no network request while the key is made. Use these keys for testing and development.
What a JWK is
- JSON Web Key (JWK). A JSON object that describes one cryptographic key, defined in RFC 7517. The
ktymember names the key type, and the other members carry the key material, such as the RSA modulusnand exponente. - JWK Set (JWKS). An object with a
keysarray of JWKs. - Issuer. Publishes the public keys of its signing pairs as a JWKS.
- Verifier. Fetches that file and picks the key whose
kidmatches the token header.
This generator creates the keys; the JWKS inspector reads and checks a JWKS that already exists.
What the generator produces
| Output | What it is | Where it goes |
|---|---|---|
| Private JWK | All key members, including d (or k for a symmetric key) |
A secret store, never a public location |
| Public JWK | The same key without private members | Your JWKS |
| JWKS | {"keys":[...]} with the public JWKs of every key you generated |
/.well-known/jwks.json or the jwks_uri of your issuer |
| PEM | PKCS#8 for the private key, SPKI for the public key | Libraries and tools that read PEM, such as OpenSSL |
| Thumbprint | SHA-256 over the required members, base64url (RFC 7638) | Use as the kid, or to match a key across systems |
Symmetric (oct) keys have no public part. The generator leaves them out of the JWKS and flags them.
Key types and algorithms
| Key type | Sizes or curves | Signing (sig) |
Encryption (enc) |
|---|---|---|---|
| RSA | 2048, 3072, 4096 bits | RS256, RS384, RS512, PS256, PS384, PS512 | RSA-OAEP, RSA-OAEP-256 |
| EC | P-256, P-384, P-521 | ES256, ES384, ES512 (one per curve) | ECDH-ES and ECDH-ES with A128KW, A192KW or A256KW |
| OKP | Ed25519 | EdDSA | Not available |
| oct | 128, 192, 256, 384, 512 bits | HS256, HS384, HS512 (key at least as long as the hash) | A128KW to A256KW, A128GCMKW to A256GCMKW, dir |
- RSA size. RSA below 2048 bits is not offered, because RFC 7518 requires 2048 bits or more for the RS and PS algorithms.
- Ed25519. Support depends on the browser: the tool tests support and disables the option with a message where it is missing.
Choose the key ID
The kid lets a verifier select the right key from a JWKS when it holds more than one. The tool offers three sources:
- Thumbprint. The RFC 7638 SHA-256 thumbprint of the public key. It is stable, unique and reproducible by anyone who has the key.
- Random. 96 random bits from the browser’s secure random generator, base64url-encoded.
- Custom. Your own label, such as
acme-2026-10. Keep values distinct within a set; the tool flags a duplicate.
The thumbprint is shown for every key, whichever source you choose.
Example: a two-key rotation set
- Select Fill in an Acme example. It creates an EC P-256 signing key, algorithm ES256, with the kid
acme-2026-10. - Change the kid to Custom, enter
acme-2027-01and select Add another key to the set. - Copy the JWKS. It now holds both public keys.
- Sign new tokens with the second private JWK. Verifiers find either key by
kiduntil the tokens signed with the first one expire, and then you remove it.
Common mistakes
- Publishing the private JWK. A member named
d(ork) must never appear in a JWKS. Publish only the JWKS block. - Mismatched curve and algorithm. ES256 needs P-256, ES384 needs P-384 and ES512 needs P-521. The tool picks the pair for you.
- A short HMAC key. A key shorter than the hash output weakens HS256, HS384 and HS512 (RFC 7518 section 3.2).
- Reusing one key for signing and encryption. The
usemember keeps the roles apart. Generate a separate key for each. - Duplicate or missing
kid. Verifiers match onkid. Duplicates make the match ambiguous.
Questions people ask
What is a JWK?
kty, and the members that hold the key material, plus optional ones such as kid, use and alg. RFC 7517 defines the format, and a JWKS groups several JWKs in a keys array.How do I generate a JWK?
crypto.subtle.generateKey creates the key pair and exportKey("jwk") returns it as a JWK. This page does exactly that and also builds the public JWK, the JWKS, the PEM files and the thumbprint.What is the difference between JWK and JWKS?
keys array that holds one or more JWKs, normally public keys. An issuer hosts the JWKS at a URL so that verifiers can fetch the key that matches the kid in a token header.Which key type should I choose for signing tokens?
Is it safe to generate a JWK in the browser?
How is the kid chosen?
kid is an identifier that you or the tool assign; RFC 7517 leaves its structure open. A common choice is the RFC 7638 thumbprint, because anyone holding the public key can recompute it. A random value or a dated label also works if each key in the set is distinct.Where to go next
- JWKS inspector. Read and check a published key set.
- JWT decoder. Decode a token and find which key signed it.
- JWT generator. Create a signed test token.
- Free SSO tools. All browser tools are listed on this page.
- Register an OpenID Connect application. See where an OpenID Connect provider publishes its keys.
Sources, all read 2026-10-27: RFC 7517, JSON Web Key (sections 4 and 5, Appendix A); RFC 7518, JSON Web Algorithms (sections 3, 4 and 6); RFC 7638, JWK Thumbprint (sections 3.1 and 3.2); RFC 8037, CFRG curves in JOSE (sections 2 and 3.1, Appendix A).