x5c (X.509 Certificate Chain) Header Parameter
x5c carries the signing certificate chain inside the header as an array of Base64 encoded DER certificates. The chain is only worth anything once it has been validated against a trust anchor you configured in advance.
At a glance
- Parameter
- x5c (X.509 Certificate Chain)
- Defined in
- RFC 7515 section 4.1.6
- Value type
- Array of strings, each a DER certificate in standard Base64
- Encoding note
- Standard Base64, not Base64URL, which is unusual inside a JOSE header
- Ordering rule
- Signing certificate first, then each certificate that certifies the previous one
- In the decoder
- Displayed as JSON in the header, which makes the array long. Verification still needs a PEM public key that you paste.
In detail
The encoding is the detail that catches people. Almost everything in a JOSE structure is Base64URL, but RFC 7515 specifies standard Base64 for the certificates in x5c, so the strings can contain plus and slash characters and carry equals padding. Decoding them with a Base64URL decoder either fails or produces corrupt DER, and the resulting error rarely points at the encoding.
Embedding the chain removes the network fetch that x5u needs, which removes the request forgery risk with it, but it does not change the trust question. A certificate in the header was put there by whoever made the token. It is only evidence once the chain has been validated to a trust anchor you configured, with expiry, revocation and key usage checked, and the subject or a pinned thumbprint compared against the issuer you expected.
Size is a practical cost. A single certificate is often one to two kilobytes before encoding, and a chain of three pushes the header past the size of most payloads. Tokens travel on every request, and some proxies cap header size, so a token that works in testing can fail at a gateway once the chain grows by one intermediate.
The decoder shows x5c as the decoded JSON array, so you can see how many certificates the issuer embedded and how large the header has become. It does not parse the certificates or extract a key from them: to verify the signature you paste the PEM public key, which for a certificate means extracting the key from it first.
Examples
{
"alg": "RS256",
"typ": "JWT",
"x5c": [
"MIIDQjCCAiqgAwIBAgIGATz/FuLiMA0GCSqGSIb3DQEBBQUAMGIxCzAJ...",
"MIIDdzCCAl+gAwIBAgIEAgAAuTANBgkqhkiG9w0BAQUFADBaMQswCQYD..."
]
}Signing certificate first, issuing certificate second. Each string is standard Base64 of the DER, not Base64URL.
Things that catch people out
- Decoding the entries as Base64URL. RFC 7515 specifies standard Base64 here, so plus, slash and padding are expected.
- Trusting the chain because it parses. Validate it to a trust anchor you configured, then check the subject or thumbprint against the expected issuer.
- Overlooking header size. A multi certificate chain can make the token several kilobytes and trip a proxy header limit.
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 →x5u (X.509 URL) Header Parameter in a JWT
The x5u header points at an X.509 certificate chain for the signing key. The SSRF and trust risks, and what a verifier has to validate.
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.
jwk (JSON Web Key) Header Parameter in a JWT
The jwk header embeds the public key in the token itself. Why trusting it verifies nothing, where it is legitimate, and how the decoder treats it.
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.
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.
Tools for this
- JWT Decoder Free online JWT decoder - decode and inspect JSON Web Tokens without sending them to a server
- Base64 Encoder/Decoder Base64 encode and decode online - convert text to Base64 or decode Base64 strings instantly, free