b2KIT

SAML Assertion Decoder

Decode and inspect SAML assertions and responses. View XML attributes, conditions, and signature details.

Tested tool guide Tested browser tools Checked August 16, 2026

What SAML Assertion Decoder does and how it behaves

Paste the SAMLResponse value captured from an SSO login, and this tool turns the opaque base64 blob back into the XML document behind it: the response status code, the assertion's issuer, subject and NameID, the conditions window, and the signature block. Decoding is trivial, because base64 is encoding, not encryption - so the tool's value is structuring the XML and surfacing the fields an SSO integration argument turns on. The common surprise: responses from HTTP-Redirect flows are DEFLATE-compressed before encoding, so a plain decode yields compressed binary instead of XML.

How the result is produced

1

Base64 to XML

A SAMLResponse is the response XML encoded as base64, so the core step is reversing that encoding: map the base64 alphabet back to the original bytes, then parse the resulting document. Parsing yields a tree the tool can walk, and it extracts the elements SSO debugging depends on - StatusCode, Issuer, Subject and NameID, Conditions, AuthnStatement and Attributes - while also showing a pretty-printed copy of the full XML.

2

Signature and conditions

Signed assertions carry a ds:Signature element from XML Signature. Its SignedInfo names the digest and signature algorithms (RSA-SHA256 is common), DigestValue pins the assertion content, and KeyInfo often embeds the IdP's X.509 certificate. The tool surfaces these details plus the Conditions validity window (NotBefore, NotOnOrAfter) and the SubjectConfirmationData. These are inspection facts; cryptographically verifying the signature against the IdP's key is a separate step.

Good uses

  • Diagnose a failed SSO login: paste the SAMLResponse captured from the SP's logs or a browser trace and read the actual StatusCode (Success, Responder, or Requester) instead of the generic error page the service provider showed.
  • Investigate 'session expired' reports: compare the Conditions NotBefore and NotOnOrAfter, and the SubjectConfirmationData NotOnOrAfter, against when the SP actually received the response, remembering every timestamp is UTC.
  • Before wiring an SP to a test IdP, decode a sample response and confirm the issuer entity ID, NameID format, audience, and attribute names match exactly what the SP's configuration expects.

Limits and checks

  • Decoded does not mean valid. An unsigned or tampered assertion decodes to the same readable XML as a genuine one. Seeing signature details is not verifying them: that requires the IdP's public key.
  • A blob from the HTTP-Redirect binding is DEFLATE-compressed before the base64 step. If decoding yields binary noise rather than a document starting with <samlp:Response or <saml:Assertion, inflate the decoded bytes first.
  • Timestamps are UTC (xs:dateTime, Z suffix), and ID values such as InResponseTo are opaque strings. An assertion that looks expired on arrival usually reflects a local-time comparison or clock skew between IdP and SP, not a bad assertion.

Common questions

I pasted a SAMLResponse and got gibberish instead of XML. What went wrong?

Most likely the response came from the HTTP-Redirect binding, which DEFLATE-compresses the XML before base64-encoding it, or the value was URL-encoded and + and / came through escaped. Inflate the decoded bytes, or URL-decode first. If the blob included a SAMLResponse=...= parameter wrapper, strip it. A clean decode starts with <samlp:Response or <saml:Assertion.

Does this tool prove my assertion is authentic, and can anyone else read it?

No and yes. The tool decodes the XML and shows its content; it does not verify the signature, which is the actual authenticity check and needs the IdP's certificate. And base64 is not encryption: anyone who sees the response, in the browser or a network capture, can decode it and read the NameID and attributes. This page decodes entirely in your browser and nothing is uploaded.

References and verification

The behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools