JWK and JWKS Inspector

Paste a JWK or a whole key set (JWKS) and see what each key is and what it's called.

FluffyShield Protected workspace
FluffyShield

Isolated workspace: other page scripts can't read your files. How FluffyShield works

Free · No upload · No sign-up · No usage quotas

Which key in this set is the one you need?

Look for its kid. That's the name a signed token gives for the key that checks it.

What the inspector does
  1. Check that no key carries a secret
  2. Have your browser load each key
  3. List each key's type, curve and kid

What it does

A single key too

One JWK on its own, without a set around it, is read the same way.

Shared kids not caught

Two keys with the same kid both show, with nothing to say they clash.

Copy one row

Every row has its own copy button, so a single kid can be lifted out.

Limits One key or one set per paste, up to 16 MiB.

A list of keys a service publishes

A login service you're connecting to has pointed you at its keys, or a developer has sent you a file that starts with {"keys": [. That's a JWKS, a JSON Web Key Set. It holds the public keys a service signs its tokens with, published so that anyone who receives a token can check it really came from that service.

Picture a ring of keys with a paper tag on each. The keys are the JWKs, and the tag is the kid, short for key ID. Nobody can tell two keys apart by looking at their long runs of letters, so the tag is how everyone refers to them.

How a token says which key to use

A signed token carries a small header at the front, and the header names a kid. The software checking the token goes through the set to the key with that kid and checks the signature with it.

Here's the idea with the sample set this page uses.

A signed token's header"alg": "ES256","kid": "sample-p256"The key set, 2 keyskid sample-p256EC P-256 · ES256this onekid sample-ed25519OKP Ed25519 · EdDSA

Matched by kid

The header is drawn for this page, not taken from a real token. The keys and their kids are the sample set's. How we checked

The sample set holds two keys of different kinds: sample-p256 is an elliptic-curve key on the curve called P-256, and sample-ed25519 is an Ed25519 key. When you're asked "which key signed this?", the kid in the token's header is the answer, and the inspector puts each key's kid right beside its type.

Finding the kids in your set

Paste the whole set as it is. Unlike JWK to PEM, the box at the top of this page, FluffyBench's Certificate and public key inspector set to JWKs, doesn't need one key picked out first.

  1. Paste the key set, or a single key, into the JWK or JWKS box.

  2. Each key gets a block of its own under What's inside, headed Public key 1, Public key 2 and so on, with its kid in it.

    The report's first block: Public key 1, an EC key on P-256 with kid sample-p256, alg ES256 and use sig.
    The report's first block: Public key 1, an EC key on P-256 with kid sample-p256, alg ES256 and use sig.
  3. Press Copy all to take the report away as text.

What alg and use tell you

Each key in the sample also has an alg and a use. ES256 on the first means signatures made with the P-256 curve and SHA-256; EdDSA on the second means Ed25519 signatures. "use": "sig" on both says they're for checking signatures, not for encrypting.

The inspector shows these as the set states them and doesn't check them. Its note above the report says as much: "Key ownership, JOSE algorithm claims and certificate references are not verified." A key that claims an alg it can't do will get through.

When a set won't open

A published key set should hold public keys and nothing else. If any key carries a private part, a d for instance, the whole set is stopped: "Private or symmetric key material is not accepted. Remove it and provide a public JWK only." If the set came from a live service, tell whoever runs it. A private key in a public list is a leak.

A key on a curve the inspector doesn't take stops the whole report as well. We added a key on secp256k1, the curve Bitcoin uses, to the sample set and got "EC conversion accepts P-256, P-384, or P-521 public keys." An empty set gets "A JWKS must have a non-empty keys array."

You've found the key and need it as PEM

JWK to PEM Converter

Copy that one key out of the set first. A whole set pasted there gets "PEM conversion accepts one public JWK. Select a key from the JWKS first."

You want to check a token's signature against this set

JWT Decoder & Verifier

Paste the token and the set, and it picks the key by the token's kid.

You've been sent something other than a JWK

Certificate and public key inspector

It reads certificates, signing requests and SSH keys on tabs of their own.

Search FluffyBench