x5t#S256 (X.509 SHA-256 Thumbprint) Header
x5t#S256 is the base64url encoded SHA-256 digest of the DER form of the signing certificate. It is the modern replacement for x5t, and the same value shape appears in the cnf claim of certificate bound access tokens.
At a glance
- Parameter
- x5t#S256 (X.509 Certificate SHA-256 Thumbprint)
- Defined in
- RFC 7515 section 4.1.8
- Value type
- Base64url encoded SHA-256 digest of the DER encoded certificate
- Digest length
- 32 bytes, which is 43 base64url characters
- Also used as
- A confirmation method inside the cnf claim for mutual TLS bound access tokens in RFC 8705
- In the decoder
- Shown in the header JSON. The hash character in the name is part of the parameter, and the decoder displays it as encoded.
In detail
The computation matches x5t with SHA-256 in place of SHA-1: take the DER encoding of the complete certificate, hash it, base64url encode the digest without padding. Thirty two bytes give forty three characters. The parameter name genuinely contains a hash character, which is legal in a JSON member name and is a nuisance in code that assumes member names are simple identifiers.
As a header parameter its role is selection, the same as x5t: pick the right certificate from a set the verifier already trusts, then verify with the key inside it. Because the digest is computed over the certificate rather than over the key, reissuing a certificate for the same key changes the thumbprint, which is a real operational detail when certificates renew more often than keys do.
The same value shape turns up in a different place. RFC 8705 binds an access token to the client certificate used on a mutually authenticated connection by putting an x5t#S256 member inside the cnf claim of the token payload. That is a payload claim about the presenter's certificate, not a header parameter about the signer's, and mixing the two up when reading a token leads to a lot of confusion.
The decoder shows the parameter in the header JSON with the hash character intact, and a cnf claim with an x5t#S256 member under Custom claims, so both are visible when both are present. Neither is resolved against anything: verification uses the PEM public key you paste, and the certificate binding is checked by the resource server on the live connection, not here.
Examples
// Header: which certificate signed this token
{ "alg": "RS256", "typ": "at+jwt",
"x5t#S256": "bwcK0esc3ACC3DB2Y5_lESsXE8o9ltc05O89jdN-dg2" }
// Payload: which client certificate may present it
{ "iss": "https://auth.example.com",
"cnf": { "x5t#S256": "A4DtL2JmUMhAsvJj5tKyn64SqzmuXbMrJa0n0elVXCg" } }Sample values. The two thumbprints describe different certificates and are not expected to match.
Things that catch people out
- Assuming the header thumbprint and the cnf thumbprint refer to the same certificate. One identifies the signer, the other the presenting client.
- Escaping or renaming the hash character when parsing. The member name is literally x5t#S256, including the hash.
- Pinning a thumbprint and forgetting certificate renewal. A reissued certificate for the same key produces a different digest and breaks the pin.
Try it: JWT Decoder
Paste a token to decode the header and payload, read the claims and expiry, and verify the signature in your browser. Nothing is uploaded.
JWT Decoder
LOCAL · Browser-OnlyDecode and inspect JSON Web Tokens without sending them to a server
Related JWT claims and algorithms
All jwt claims and algorithms →x5t (X.509 Certificate SHA-1 Thumbprint) Header
The x5t header holds a SHA-1 thumbprint of the signing certificate. How it selects a certificate, why SHA-1 here is not the usual problem, and what to prefer.
cnf (Confirmation) Claim in a JWT
The cnf claim binds a token to a key its holder must prove. How mTLS and DPoP use it, why it stops replay of a stolen token, and decoder limits.
x5c (X.509 Certificate Chain) Header Parameter
The x5c header embeds the X.509 certificate chain in the token. Why it uses standard Base64 rather than Base64URL, and how a verifier must treat it.
crit (Critical) Header Parameter in a JWT
The crit header lists extension parameters a verifier must understand or reject. The rules on what may appear in it, and why it fails closed by design.
iss (Issuer) Claim in a JWT
The iss claim names who issued a token. What goes in it, why validators compare it byte for byte, and how the decoder displays it.
sub (Subject) Claim in a JWT
The sub claim says who the token is about. Why it is only unique within one issuer, what pairwise subjects change, and how the decoder shows it.
Tools for this
- JWT Decoder Free online JWT decoder - decode and inspect JSON Web Tokens without sending them to a server
- Hash Generator Free online hash generator - generate MD5, SHA-1, SHA-256 hashes from any input text