
Verify a JWT Signature Against a JWKS Without a Backend
Paste a token and a JWKS to check an RS256, ES256 or HS256 signature in your browser. How kid picks the key, measured errors and the claims to check.
A signature check needs the token and the right public key
Decoding a JWT shows what it claims. Verifying it shows whether the key you expect signed those claims. With an OpenID Connect provider such as Auth0, Keycloak or Cognito, that key sits in a JWKS, a JSON document of public keys. This guide explains how the verifier picks a key and how to read its answer when an integration fails. It uses the JWT verify tool, which takes the JWKS as pasted text and never fetches a URL, so no server is needed. On 26 October 2026 we ran 31 test cases through the verifier code and report what each returned. They cover RS256, ES256 and HS256 tokens, plus tampered, expired and mismatched ones. The rules come from RFC 7515, 7517, 7518, 7519 and 8725. To read a token before verifying it, start with our JWT encode and decode guide.
How a JWKS works and how the key is chosen
RFC 7517 defines a JWK Set as an object with a keys array. The order of the keys carries no preference unless an application decides otherwise. Each key states its type in kty and carries the numbers needed to check a signature.
Improvements
crv, x and y. A P-256 key produces ES256 signatures.sig for signing or enc for encryption.oct holds a shared secret in k. That is private material, even inside a document called a key set.RFC 7515 calls kid a hint about which key secured the token, and the header is optional. The verifier compares it with the kid of each JWK. What happens without a match depends on the tool, so we tested it.
Improvements
The third segment of the token is the signature. Its length and encoding depend on the algorithm, which explains some failures that look like corruption.
Improvements
A valid signature shows that the holder of the private key signed this header and this payload. It does not show that the token was meant for your service or that it is still current.
Improvements
other and an iss of https://evil.example both failed as claim errors, while the signature itself was fine.Debugging an OIDC token without a server
Copy the access or ID token from the failing request, without the Bearer prefix. Then get the JWKS from the provider. Its address is the jwks_uri value of the discovery document, served at the issuer address followed by /.well-known/openid-configuration.
https://YOUR_DOMAIN/.well-known/jwks.json.https://cognito-idp.REGION.amazonaws.com/USER_POOL_ID/.well-known/jwks.json and signs its tokens with RS256./realms/REALM/protocol/openid-connect/certs. Recent versions no longer add the old /auth prefix.The same decisions apply in the tool and in production code. Set them once, in your configuration, and never read them from the token.
Reading the verifier answer
The tool answers key_not_found when the token has no kid and the set holds several keys, or when its kid is absent from the set.
The tool found a key and the check failed. Several causes produce the same message.
Some answers come before any signature check.
Bearer prefix. In our test the tool did not strip it. A trailing newline did no harm.alg none: an unsigned token cannot be verified, and your server should reject it too.oct key.Four mistakes in JWKS verification
The signature proves who issued the token. It says nothing about what the holder may do on your service.
A JWK with d, or an oct key with k, is a secret. A public key set never needs it.
hasPrivate for each key, and the pretty view removes d, the RSA factors and oct k.The alg header belongs to the sender. If the verifier follows it, an attacker chooses the check.
alg none on a test route that reaches production.enc verified it too. Production code should be stricter.key_ops, as jose does.Both extremes fail. One adds a network call to every request, the other locks users out at the first rotation.
Four claims about JWKS and signatures
The label is written by the sender, so it proves nothing by itself.
People hesitate to paste one into a tool.
oct key, whose k value is a shared secret that you must never publish.This belief sends people into conversion code that is not needed in a JWT.
The idea comes from libraries that fetch keys and cache them on a server.
Verify and inspect in the browser
The JWT verify tool checks the signature and, if you ask, the audience, the issuer and the time claims. It supports 14 algorithms, among them RS256, ES256 and HS256.
Paste the token
Paste the compact JWT first. The key tabs follow the alg read from its header.
Paste the JWKS body
Paste the JSON of the key set, a single JWK or a public PEM. To turn a PEM key into a JWK first, use the PEM and JWK converter. For an HS256 token, use the HMAC secret tab.
Set the checks
Enter the audience and the issuer if you want them compared, and choose a clock tolerance of 0, 60 or 300 seconds. The Ignore expiration option still checks the signature.
Read the verdict
The result shows valid with the algorithm and the kid, or an error code described in the troubleshooting section above.
The JWKS inspector reads a JWK or a JWKS without verifying anything. Use it before the verifier when a set comes from someone else.
Paste the JWKS
Paste a key set or a single key. Private fields are removed from the output and from the copy.
Switch to the Inventory view
The inventory lists kid, kty, use, alg, crv and hasPrivate for each key, without printing any key material.
Sort the keys
The Sort keys option orders the JSON so that two environments can be compared in a diff.
Both pages work on pasted text. A few limits are worth knowing.
The same checks in a terminal and in your code
Replace the address with your issuer. The last command reads the kid from the first segment of a token held in the TOKEN variable.
Basic example
createRemoteJWKSet downloads the set, caches it and picks the key by kid and alg. The algorithm, issuer and audience come from your configuration.
Basic example
createLocalJWKSet takes the set you already hold. In our tests it threw ERR_JWKS_NO_MATCHING_KEY for an unknown kid. It threw ERR_JWKS_MULTIPLE_MATCHING_KEYS for a token without kid and two RSA keys, and ERR_JOSE_ALG_NOT_ALLOWED when the algorithm list excluded the token alg.
Basic example
Conclusion
Verifying against a JWKS comes down to three decisions. Pick the key by kid and alg. Check iss, aud and exp. When the key is missing, refresh the set instead of trusting the token. The browser tools let you reproduce each case with pasted text before you touch a server. Inspect the set, verify the token, then copy the same pins into your code.
Try the key tools in your browser
hasPrivate before pasting it anywhere.Related Articles

HTTP/2 and HTTP/3 change how files travel, not how big they are. Measured sizes, compile times and bundling tests show what minification still saves.

Convert a Unix epoch to a readable date and back, tell seconds from milliseconds, and avoid time zone, JWT and clock change traps, all in your browser.

Read a cron expression field by field, check its next runs in UTC or local time and avoid traps with steps, time zones and dialects, all in your browser.