What is a SAML message?

SAML (Security Assertion Markup Language) 2.0 is how many single sign-on (SSO) setups work. When you sign in to an app through your company's identity provider, such as Okta, Microsoft Entra ID, Google Workspace or Keycloak, the app sends the identity provider a request (an AuthnRequest), and the identity provider sends back a response that says who you are (a Response with an Assertion). Both are XML documents, but they travel encoded, so they look like long blocks of random letters in your browser's network log.

How to decode one

Paste the message in any of the forms you're likely to have it:

  • The value of a SAMLRequest or SAMLResponse field, copied from the network tab of your browser's developer tools or from a SAML tracer extension.
  • A whole URL, or a form body like SAMLResponse=…&RelayState=…, that carries such a field. The RelayState and, for a signed redirect, the signature algorithm are shown too.
  • The XML itself, to read its fields.

The decoder works out the encoding on its own:

  • The HTTP-POST binding sends the XML Base64-encoded, in a hidden form field.
  • The HTTP-Redirect binding compresses the XML with DEFLATE, Base64-encodes it and URL-encodes the result, so it fits in a link. The decoder undoes all three steps.

Line breaks, URL-safe Base64 and plus signs turned into spaces by form decoding are all handled.

What you see

  • Binding and parameter: how the message was encoded, and whether it's a request or a response.
  • Message: the fields people usually check while setting up or debugging SSO. They include the issuer (who sent it), the destination, the status (Success, or an error such as Responder / AuthnFailed), the name ID (who signed in) and its format, the audience (which app the assertion is for), and the validity window (Not before and Not on or after). They also include the authentication context, the session index and whether the message, the assertion or, for the HTTP-Redirect binding, the URL carries a signature.
  • Attributes: the user attributes the identity provider released, such as email, name and groups, with every value of each.
  • Decoded XML: the whole message, indented, ready to copy or download.

Good to know

  • The decoder shows whether a signature is present, but it doesn't verify it: that needs the identity provider's certificate and is the service provider's job.
  • An encrypted assertion (EncryptedAssertion) can only be read with the service provider's private key, so the decoder says it's there but can't show its contents.
  • Times in SAML messages are in UTC. A common cause of failed sign-ins is a clock difference between the servers, which shows up as a Not before time in the future or a Not on or after time already past.
  • Everything happens in your browser. Nothing you paste is sent anywhere, which matters because a SAML response can contain personal details.

Features

  • Decodes HTTP-Redirect (deflated) and HTTP-POST (Base64) messages
  • Accepts values, whole URLs, form bodies and plain XML
  • Lists the issuer, status, subject, conditions and authentication details
  • Shows every attribute and its values
  • Indented XML to copy or download
  • Runs in your browser