Skip to content

SAML decoder

Free, no sign-up Runs in your browser

Decode a Base64 or deflated SAML request or response to readable XML, with the issuer, NameID, conditions and audience, and checks for unsigned assertions.

Base64, Base64 with DEFLATE (redirect binding), URL-encoded or plain XML. It is decoded in your browser and is not sent anywhere.

Everything you type here stays in your browser. Nothing is sent to HardenKit or to anyone else.

How to use the SAML decoder

  1. Copy the SAMLResponse or SAMLRequest value from your browser’s network tab, or the whole redirect URL.
  2. Paste it. Base64, deflated and URL-encoded forms are detected.
  3. Read the issuer, destination, NameID, conditions and audience.
  4. Read the checks, and scroll down for the formatted XML.

About this tool

SAML single sign-on works by passing XML messages through the browser. The service provider sends an AuthnRequest to the identity provider, and the identity provider answers with a Response that carries an assertion: who the user is, when the statement is valid and which service it is for. On the wire these are Base64 in a form field, or compressed with DEFLATE, Base64-encoded and URL-encoded in a redirect URL.

When a login fails, the answer is almost always inside that message: a wrong audience, a destination that does not match, a clock that is off so the conditions have not started or have ended, a NameID in a format the service does not expect. This tool unwraps either encoding in your browser, formats the XML and lists those fields. Nothing is sent anywhere, which matters because a response holds personal data and, while fresh, works as a login.

It also reports whether the response and the assertion carry a signature element. An assertion with no signature anywhere proves nothing, and one covered only by the response signature is where signature wrapping bugs appear. The tool does not verify signatures: that needs the identity provider’s certificate and is the service provider’s job. The checks are a set of rules and do not replace a review of your SAML setup.

Sources

Questions

How do I decode a SAML response?

Take the SAMLResponse form field from the POST to your assertion consumer service and Base64-decode it; the result is XML. A SAMLRequest in a redirect URL is URL-decoded, Base64-decoded and then inflated with raw DEFLATE. This tool does all three steps.

Where do I find the SAML response in my browser?

Open the developer tools, go to the Network tab and turn on Preserve log, then sign in. Find the POST request to your service’s ACS URL and look at its form data for SAMLResponse.

Is it safe to paste a SAML response into a tool?

Only into one that keeps it local. A response contains the user’s identity and attributes, and until it expires it can be replayed against a service that does not track used assertions. This page decodes in your browser and sends nothing.

Should the SAML response or the assertion be signed?

At least one must be, and signing the assertion is the safer default because the signature travels with the claims it protects. The service provider must verify the signature and use only the signed element.

What do NotBefore and NotOnOrAfter mean?

They bound the time in which the assertion may be accepted, usually a few minutes. A service must reject the assertion outside that window, so clock differences between the two sides are a common cause of failed logins.

Related tools