alg — Algorithm

Location: header · Format: string

On a JWS this is the signing algorithm (e.g. HS256, RS256, EdDSA); on a JWE it is the key-management algorithm used to establish the content-encryption key (e.g. RSA-OAEP, ECDH-ES, dir). It must never be trusted blindly to select the verification routine — a verifier must pin the expected algorithm family from its own configuration/key type, or it is exposed to alg-confusion and "none" bypass attacks.

Defined in RFC 7515 §4.1.1 / RFC 7516 §4.1.1.

Decode a JWT and inspect its alg claim in the TokenPrism debugger — free, entirely in your browser.