x5t (X.509 Certificate SHA-1 Thumbprint) Header
x5t is the base64url encoded SHA-1 digest of the DER form of the signing certificate. It identifies which certificate to use out of a set you already hold, in the same way kid identifies a key.
At a glance
- Parameter
- x5t (X.509 Certificate SHA-1 Thumbprint)
- Defined in
- RFC 7515 section 4.1.7
- Value type
- Base64url encoded SHA-1 digest of the DER encoded certificate
- Digest length
- 20 bytes, which is 27 base64url characters
- Required
- Optional. x5t#S256 is the modern equivalent and should be preferred.
- In the decoder
- Shown in the header JSON as a string. The tool does not resolve it against any certificate store.
In detail
The value is computed over the DER encoding of the whole certificate, not over the public key inside it, and the result is base64url encoded without padding. Twenty bytes of digest give twenty seven characters, which is a quick way to tell x5t from x5t#S256 at a glance: the SHA-256 variant is forty three characters.
Its job is selection, not verification. The verifier holds a set of certificates it already trusts, computes or stores their thumbprints, and uses the header value to pick one. Nothing about the token is proved by the thumbprint matching, exactly as nothing is proved by kid matching; the proof comes afterwards from checking the signature with the key in that certificate.
SHA-1 is broken for collision resistance, and the usual conclusion does not quite transfer here. Producing a second certificate with the same thumbprint requires a preimage attack, which SHA-1 still resists, and a colliding pair would both have to be certificates the verifier trusts. The reason to prefer x5t#S256 is that its security margin is not something anyone has to reason about carefully.
In the decoder x5t appears as a plain string in the header JSON. The tool does not hold certificates and does not resolve thumbprints, so the value is informational here: verification still means pasting the PEM public key. Comparing the value against a certificate you have is a small manual step, and one worth taking when a verifier is picking the wrong certificate.
Examples
{
"alg": "RS256",
"typ": "JWT",
"x5t": "dGhpcy1pcy1hLXNhbXBsZS12YWx1",
"x5t#S256": "bwcK0esc3ACC3DB2Y5_lESsXE8o9ltc05O89jdN-dg2"
}Sample values. The SHA-1 thumbprint is 27 base64url characters, the SHA-256 one is 43.
Things that catch people out
- Hashing the PEM text instead of the DER bytes. The thumbprint is over the binary certificate, so the base64 armour and the header lines must be removed first.
- Hashing only the public key. The digest covers the entire certificate.
- Emitting x5t alone in a new deployment. x5t#S256 exists for this and costs nothing extra to compute.
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#S256 (X.509 SHA-256 Thumbprint) Header
The x5t#S256 header holds a SHA-256 thumbprint of the signing certificate. How it is computed, where mTLS bound tokens reuse the value, and what to check.
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.
kid (Key ID) Header Parameter in a JWT
The kid header says which key signed a token. How rotation depends on it, why the value must be a lookup and never a path, and decoder behaviour.
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