SAML (Security Assertion Markup Language) 2.0 is an XML-based standard ratified by OASIS in 2005 for exchanging authentication and authorization data between an identity provider (IdP) and a service provider (SP). It is the backbone of enterprise single-sign-on for products like Okta, Azure AD / Entra ID, OneLogin, Ping, ADFS, Shibboleth, and Auth0's enterprise tier. Despite OIDC's growing share, SAML is still the dominant SSO protocol inside corporate networks.
A SAML Response is a Base64-encoded XML document POSTed by the IdP to the SP's Assertion Consumer Service (ACS) URL. The HTTP-POST binding wraps the Base64 string in a form field named SAMLResponse; the HTTP-Redirect binding additionally DEFLATE-compresses and URL-encodes the payload. This decoder accepts all three shapes: raw XML, URL-encoded XML, and Base64 (with optional URL-safe replacements of - and _ for + and /).
Decoding works in three steps. The browser's built-in atob() function reverses the Base64 alphabet (after this tool repads the string to a multiple of four with =). decodeURIComponent unwraps URL escapes if present. Then a small regex-based parser extracts the SAML-specific fields: Issuer, Destination, IssueInstant, NameID and its Format, the StatusCode value, and every Attribute name-value pair inside the AttributeStatement. The pretty-printer is a depth-tracking indenter rather than a real XML formatter, which keeps the bundle small at the cost of being lenient about malformed input.
An important boundary: this tool decodes, it does not verify. SAML's security guarantees come from the XML Signature (XMLDSig) wrapping the Assertion or the Response. Verifying that signature requires the IdP's public X.509 certificate, the SP's expected audience and ACS URL, and an XML canonicalization library — all of which belong on the server. Real SP libraries like passport-saml, saml2-js, python3-saml, and OneLogin's SAML SDK do this with care, including defenses against XML signature wrapping (XSW) attacks. Treat the decoded fields as informational.
Common operational issues that show up clearly here. Clock skew between IdP and SP causes NotBefore / NotOnOrAfter rejections — IssueInstant tells you what the IdP thinks the time is. Audience-restriction failures appear when the Audience element does not match the SP's EntityID. NameID-format mismatches (the SP expects emailAddress but the IdP sends persistent) show up in the Format attribute. Attribute-name mismatches (Email vs email vs http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress) are visible in the Assertion Attributes table.
Be aware of SAML's known vulnerabilities. Signature wrapping attacks rearrange the XML so a verifier signs one element but trusts another; XML External Entity (XXE) attacks exploit DOCTYPE processing in poorly configured parsers; the alg=none equivalent for SAML is accepting an unsigned assertion. None of these matter for read-only decoding, but they are critical when implementing the SP side. Keep your SAML library current and follow the OWASP SAML cheat sheet.
Everything happens in your browser. The SAMLResponse, which often contains real user identifiers and roles, is never sent to a server. Closing the tab discards it. Even so, treat captured production responses as sensitive — the attributes can include email, employee ID, group memberships, and entitlements that you do not want pasted into shared chat or screenshots.