b2KIT

JWK Generator

Generate JSON Web Keys (JWK) and JWK Sets for RSA, EC, and symmetric key types used in JOSE/JWT.

Tested tool guide Tested browser tools Checked August 16, 2026

What JWK Generator does and how it behaves

JWK Generator creates fresh key material in JSON Web Key form for RSA, elliptic-curve (EC), and symmetric (oct) keys, and can package keys in a JWK Set. The selected key family determines the required JSON members and which values are public or secret. Generation happens entirely in the browser, so key material is not uploaded. A valid JWK is not automatically safe to publish: RSA and EC private parameters must be removed from a public JWKS, while an oct JWK is itself a shared secret and has no publishable public half.

How the result is produced

1

Members by key type

Key type controls the representation. An RSA JWK uses kty "RSA" and represents its public key with n and e; a private form also carries d and may carry additional private parameters. An EC JWK uses kty "EC", a named crv, and x and y coordinates, plus d for a private key. A symmetric JWK uses kty "oct" and stores the secret in k.

2

Encoding and set structure

Binary integers, coordinates, and secrets are encoded as base64url strings under the JOSE specifications, not as decimal numbers, hexadecimal, or PEM text. A JWK Set is a JSON object whose keys member is an array of JWK objects. Optional metadata such as kid, use, key_ops, and alg describes identification or intended handling; it does not change the underlying key.

Good uses

  • Generate an RSA or EC signing key pair for a test authorization server, retain the private JWK, and place only the public-key members in the server's published JWKS.
  • Create an oct JWK when a JOSE library or test fixture expects a base64url-encoded symmetric key instead of a plain passphrase.
  • Build a JWK Set containing multiple public keys to test key rotation and a JWT verifier's selection of the correct key by kid.

Limits and checks

  • Generated key material is intentionally not deterministic. Repeating the same key-type choices produces different values, so examples cannot prescribe the exact n, x, y, d, or k that will appear.
  • The alg member, when present, states an intended JOSE algorithm. It does not perform an operation, prove compatibility with every consumer, or force a library to accept the key.
  • A kid value is an identifier, not evidence of ownership or uniqueness. Unless it was deliberately derived using an agreed method, do not treat it as a cryptographic fingerprint.

Common questions

Can I publish the generated JWK Set at a JWKS URL?

Only after confirming that it contains public material alone. For RSA, publish a JWK with the public n and e values and omit private parameters. For EC, publish crv, x, and y and omit d. Do not publish an oct JWK, because k is the shared secret. Keep the full private or symmetric output in protected storage.

Is a JWK the same as a PEM key or a JWT?

No. A JWK is a JSON representation of one cryptographic key, while a JWK Set is a JSON container for multiple JWKs. PEM is a textual envelope commonly used for other key encodings. A JWT is a token whose signature or encryption can use a key represented as a JWK; generating a JWK does not create a token.

References and verification

The behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools