Base64 Tools
Base64 ⇄ XML Converter
Decode Base64 payloads to validated, formatted XML — the SAML/SOAP debugging shortcut — or encode XML for transport.
In short
Decode Base64 to XML online (and encode XML to Base64): UTF-8 safe, well-formedness validated, formatted output. Common in SOAP and SAML debugging.
By NaveenKumar T · Updated
Learn: What is Base64? Encoding Explained Without the Mystique
- Both directions in one tool
- UTF-8 safe en/decoding
- Validates & formats the XML
Runs entirely in your browser — nothing you paste or open here is uploaded, logged, or stored.How we handle data →
Example
Base64 to XML: input and output
A small invoice document encoded for an XML-in-JSON API field.
<?xml version="1.0" encoding="UTF-8"?>
<invoice number="INV-0931">
<customer>Søren Kjær</customer>
<total currency="DKK">1249.00</total>
</invoice>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPGludm9pY2UgbnVtYmVyPSJJTlYtMDkzMSI+CiAgPGN1c3RvbWVyPlPDuHJlbiBLasOmcjwvY3VzdG9tZXI+CiAgPHRvdGFsIGN1cnJlbmN5PSJES0siPjEyNDkuMDA8L3RvdGFsPgo8L2ludm9pY2U+The declaration, attributes and indentation are all inside the Base64, and ø and æ each contribute two bytes to it rather than one; decoding the output here returns the same document, re-indented.
Learn more
Where Base64-encoded XML appears
Enterprise protocols love wrapping XML in Base64: SAML assertions, SOAP attachments (MTOM/SwA), signed payloads in headers, XML documents embedded inside JSON fields. This tool unwraps them in one step — decode, well-formedness check, pretty print — turning an opaque blob into a readable envelope with exact positions for any structural error.
Encode mode prepares XML for the same channels: validated first, then encoded UTF-8-safely so namespaces, declarations, and non-ASCII content round-trip perfectly.
A SAML debugging session, step by step
The classic flow: SSO fails, you open browser DevTools, find the POST to the ACS URL, and copy the SAMLResponse form value. Paste it here, Convert, and the assertion XML appears formatted — now you can actually check the three usual suspects: the NotOnOrAfter timestamp (clock skew), the Audience element (entity ID mismatch), and the Destination attribute (URL mismatch). Five minutes instead of a support ticket.
Because assertions carry real user attributes — emails, names, group memberships — decoding them on a server-backed converter is a compliance incident waiting to happen. Here the decode is local, which is exactly what your security team would specify if asked.
Help
Frequently asked questions
Everything you need to know about the Base64 to XML.
01How do I use Base64 to XML?
Paste XML and Convert to Base64-encode it (XML → Base64 is the default mode); switch the mode to Base64 → XML to decode a SAMLResponse, an embedded document or an attachment blob into validated, formatted XML.
02Can I decode a SAMLResponse with this?
SAML responses are usually decodable here — they're Base64-encoded XML, and POST-binding responses decode directly. Redirect-binding values are ALSO deflate-compressed before encoding; if the decode reports non-UTF-8 bytes, that's the compressed variant, which needs inflating first.
03My XML declares encoding="ISO-8859-1" — will Base64 → XML decode it?
Only if the bytes are actually UTF-8. The decoder is strict: any byte sequence that is not valid UTF-8 — a lone 0xE9 for é in real Latin-1 data, say — is rejected with the non-UTF-8 error, whatever the declaration claims. Pure-ASCII content decodes regardless, and a leading UTF-8 byte-order mark is dropped automatically. Encode mode always produces UTF-8 bytes, so if your declaration says ISO-8859-1 the receiver may misread accented characters; change it to UTF-8 before encoding.
Keep working
Related tools
Base64 to JSON
Base64 Tools
XML Formatter
Re-indent any XML document into clean, readable markup — comments and CDATA preserved, validation built in.
SOAP Formatter
Turn captured SOAP envelopes into readable XML — Header and Body cleanly indented, namespaces intact.
XML Validator
Strict well-formedness checking with the exact line and column of every violation — fix XML errors in seconds.
Base64 Encode Decode
Base64 Tools
XML URL Encode
Carry XML through URLs intact — well-formedness checked, percent-encoded, decoded back to formatted markup.