DevKits

JWKS Generator — Build a /.well-known/jwks.json Endpoint

Assemble multiple RSA/EC public keys into a standard JSON Web Key Set (JWKS, RFC 7517). Paste PEM (public or private — private components are stripped) or JWK, then auto-generate kid via SHA-256 thumbprint (RFC 7638). Ready to host at /.well-known/jwks.json.

Last updated:

Comments

Assemble a JWKS (JSON Web Key Set, RFC 7517) that you can host at /.well-known/jwks.json. Paste one or more RSA/EC public (or private) keys — private components are stripped automatically. Nothing is uploaded.

Key #1
0 chars · 1 lines

Frequently Asked Questions

What is a JWKS and when do I need one?

A JWKS (JSON Web Key Set, RFC 7517) is a JSON document with a top-level 'keys' array of JWKs. It's the standard way to publish public keys so that clients can verify JWTs your service signed. Typical setup: your backend signs JWTs with a private key you keep secret, and hosts the matching public key(s) at /.well-known/jwks.json. Client libraries fetch that URL, cache it, and use the kid claim in each JWT to pick the right key.

What is a kid and how is it generated?

kid stands for 'Key ID' — a string identifier that lets JWT verifiers know which key to use when you rotate. This tool defaults to computing a SHA-256 JWK Thumbprint per RFC 7638, which is a deterministic hash of the public key's essential fields. Same key → same kid → clean rotation semantics. You can override with a custom string (e.g. '2026-q3', 'auth-signer-1') if you prefer.

Can I paste private keys?

Yes — the tool auto-strips private components (d, p, q, dp, dq, qi, oth) before serialising. But be careful: your private key still passes through this tool's memory. Everything is client-side and nothing is uploaded, but for production keys, prefer to paste only the public halves. Use our Public Key Extractor first if you want to be extra defensive.

What alg should I set on each key?

If you leave alg blank, the tool guesses based on key type: RSA → RS256, EC P-256 → ES256, P-384 → ES384, P-521 → ES512. Override to PS256 / PS384 / PS512 if you use RSA-PSS instead of RSASSA-PKCS1-v1_5. The alg claim is a hint to verifiers — many JWT libraries also honour it as a security check against algorithm substitution attacks.

How do I host the output?

Save the JSON as jwks.json and serve it from your web server or CDN at https://your-domain/.well-known/jwks.json with Content-Type: application/json. Set a moderate Cache-Control (5–15 minutes is typical) so verifiers can cache it but still notice rotation reasonably quickly. Most JWT libraries (jsonwebtoken, jose, node-jose, PyJWT, jose4j) have a jwksUri option that handles fetching and caching automatically.

Related Tools