JWKS Viewer & JWK Inspector
Paste a JSON Web Key Set or a single JWK to see every key’s kid, type, algorithm, size and RFC 7638 thumbprint at a glance. The viewer flags private key material, duplicate or missing kid values and weak RSA keys, then exports public keys as PEM, entirely in your browser.
How It Works
A JSON Web Key Set (RFC 7517) is a JSON object with a "keys" array that publishes the public keys an identity provider uses to sign tokens, usually at /.well-known/jwks.json. Each JWK describes one key through members such as kty (key type), kid (key ID), alg and use, plus the key parameters themselves: n and e for RSA, crv, x and y for EC, or x for OKP.
When your API receives a JWT, it reads the kid from the token header, finds the matching key in the set and verifies the signature with it. This is what makes rotation painless: the provider adds a new key under a new kid, signs new tokens with it and keeps the old key published until older tokens expire.
This viewer parses the JSON you paste, lists every key, computes the RFC 7638 thumbprint and reports the real RSA modulus size or EC curve. It flags private members, symmetric oct keys, missing or duplicated kid values, weak RSA keys and mismatched alg or use values. It never fetches a URL: you paste the content and everything stays in your browser.
Step-by-Step Guide & Real Example
Audit a key set before you publish it or trust it:
1. Paste Your JWKS
Paste a full key set, a single JWK or an array of keys. Use Load sample to see the format. Up to 100 keys are accepted.
2. Read Each Key Card
Check kid, kty, alg and use, then the RSA size in bits or the EC curve. The thumbprint gives every key a stable fingerprint you can compare across systems.
3. Fix the Findings
Red errors mean private material or a symmetric key sits in the set. Amber warnings cover missing or duplicate kid values, weak RSA and mismatched algorithms.
4. Export Public Keys
Copy a public RSA or EC key as an SPKI PEM block for libraries that do not read JWK. Private keys are never exported.
Worked Example: RFC 7638 Section 3.1 Thumbprint
{"e":"AQAB","kty":"RSA","n":"0vx7agoebGcQSuuPiLJXZptN9nndrQmbXEps2aiAFbWhM78LhWx4cbbfAAtVT86zwu1RK7aPFFxuhDR1L6tSoc_BJECPebWKRXjBZCiFV4n3oknjhMstn64tZ_2W-5JsGY4Hc5n9yBXArwl93lqt7_RN5w6Cf0h4QyQ5v-65YGjQR0_FDW2QvzqY368QQMicAtaSqzs8KJZgnYb9c7d0zgdAZHzu6qMQvRL5hajrn1n91CbOpbISD08qNLyrdkt-bFTWhAI4vMQFh6WeZu0fM4lFd2NcRwr3XPksINHaQ-G_xBniIqbw0Ls1jF44-csFCur-kEgU8awapJzKnqDKgw"}NzbLsXh8uDCcd-6MNwXF4W_7noWXFZAfHkxZsRGC9XsThe 2048-bit key from the RFC hashes to exactly this 43-character value. Members are sorted alphabetically with no whitespace, so any correct implementation produces the same fingerprint.
Common Mistakes & Security Notes
Publishing a Private JWK
Members such as d, p and q are private. If they appear in jwks.json, anyone can forge tokens. Publish public parameters only.
Reusing or Omitting kid
Without a unique kid, verifiers must try every key and rotation becomes guesswork. Give each key a distinct kid, ideally its thumbprint.
Putting Symmetric Keys in a Public Set
A kty of oct holds a shared secret in the k member. A public JWKS must never include it; share HMAC secrets through a private channel.
Trusting alg From the Token
Pin the expected algorithm for each key. Letting the token header decide enables algorithm confusion, for example HS256 checked with an RSA public key.
JWK Key Types and Their Thumbprint Members
| kty | Thumbprint members | Typical alg | Safe in a public JWKS |
|---|---|---|---|
| RSA | e, kty, n | RS256, PS256 | Yes, public parts only |
| EC | crv, kty, x, y | ES256, ES384, ES512 | Yes, public parts only |
| OKP | crv, kty, x | EdDSA | Yes, public parts only |
| oct | k, kty | HS256, HS384, HS512 | Never |
Code Snippets (Node.js, Python, Java)
Verify tokens against a JWKS in your backend:
import { createRemoteJWKSet, jwtVerify, calculateJwkThumbprint } from 'jose';
import type { JWK } from 'jose';
const JWKS = createRemoteJWKSet(new URL('https://auth.example.com/.well-known/jwks.json'));
export async function verify(token: string) {
const { payload, protectedHeader } = await jwtVerify(token, JWKS, {
issuer: 'https://auth.example.com',
audience: 'my-api',
algorithms: ['RS256'],
});
return { payload, kid: protectedHeader.kid };
}
export const thumbprint = (jwk: JWK) => calculateJwkThumbprint(jwk, 'sha256');import jwt # PyJWT with the cryptography package
from jwt import PyJWKClient
client = PyJWKClient("https://auth.example.com/.well-known/jwks.json")
def verify(token: str) -> dict:
signing_key = client.get_signing_key_from_jwt(token)
return jwt.decode(
token,
signing_key.key,
algorithms=["RS256"],
audience="my-api",
issuer="https://auth.example.com",
)import com.nimbusds.jose.jwk.JWK;
import com.nimbusds.jose.jwk.JWKSet;
import com.nimbusds.jose.util.Base64URL;
import java.net.URL;
public class JwksInspect {
public static void main(String[] args) throws Exception {
JWKSet set = JWKSet.load(new URL("https://auth.example.com/.well-known/jwks.json"));
for (JWK jwk : set.getKeys()) {
Base64URL thumbprint = jwk.computeThumbprint();
System.out.println(jwk.getKeyID() + " " + jwk.getKeyType() + " " + thumbprint);
}
}
}Frequently Asked Questions
What is the difference between a JWK and a JWKS?
A JWK is a single key written as JSON. A JWKS is an object with a keys array that holds one or more JWKs, as defined in RFC 7517.
What is a JWK thumbprint and why use it?
RFC 7638 defines it as the SHA-256 hash of the required members in canonical JSON, Base64URL encoded. It gives a stable identifier that works well as a kid.
Why does the viewer warn about private key members?
Parameters such as d, p, q, dp, dq and qi are private. A published JWKS that exposes them lets anyone sign tokens your API will accept.
Can this tool fetch my jwks.json from a URL?
No. It only reads pasted content, so it never contacts your server and avoids CORS and server-side request risks. Open the URL in a tab and copy the JSON.
How large should an RSA key in a JWKS be?
Use at least 2048 bits. The viewer measures the real modulus length from n and warns below that, because shorter keys are considered weak.
How should I rotate keys in a JWKS?
Add the new key under a new kid, start signing with it and keep the old key published until every token it signed has expired. Then remove it.
Related Tools
About the author
Avada Labs builds free developer tools, including this site, with six years of experience in web development and online tools. Projects and source code are on GitHub.