Base64 to XML
Paste Base64 and instantly recover the original XML text, decoded safely as UTF-8.
Example
Base64 input decodes back to XML:
PG5vdGU+PHRvPkNhZsOpPC90bz48L25vdGU+
→
<note><to>Café</to></note>
How it works
Strips whitespace, decodes the Base64 with atob, then reinterprets the bytes as UTF-8 so non-ASCII XML content survives. Decoding runs live as you type and entirely in your browser.
Good to know
Base64 to XML takes a Base64-encoded string and turns it back into the original XML text, decoding the bytes as UTF-8 so accented letters, Cyrillic, and other non-ASCII characters come through intact. It is aimed at developers, API integrators, and anyone who has received XML wrapped in Base64 inside a config file, a JSON payload, a SOAP envelope, a JWT claim, or a database column and needs to see the readable markup.
Reach for it whenever XML has been Base64-encoded for safe transport: inspecting a webhook body, debugging an SSO or SAML assertion, reading an encoded element in a log line, or checking what a system actually stored before it was decoded. Because everything runs locally in the browser with no upload, it is also a sensible choice when the encoded blob contains sensitive data you would rather not paste into a remote service.
Read the result as plain decoded text, not as validated XML. The tool reports how many characters it recovered and flags whether the output starts with a "<" character as a rough hint that the content looks like markup; it does not parse the document, so a "looks like XML" status does not guarantee the tags are balanced or well-formed. If you need to confirm structure, paste the output into a dedicated XML validator or pretty-printer.
A practical note on input: the decoder strips whitespace and line breaks automatically, accepts URL-safe Base64 (it converts "-" and "_" back to "+" and "/"), and repairs missing "=" padding, so copy-paste from wrapped or URL-friendly sources usually just works. If you get a "not valid Base64" message, check for stray text such as a data-URI prefix (for example "data:application/xml;base64,") or HTML entities that slipped in alongside the encoded string.
Frequently asked questions
Does it handle non-ASCII XML content like accents or Cyrillic?
Yes. The decoded bytes are interpreted as UTF-8 using TextDecoder, so characters like é, ö, or Cyrillic text are recovered correctly rather than turning into garbled symbols.
Does it validate that the result is well-formed XML?
No. This tool only Base64-decodes the input and shows the resulting text. It checks whether the output starts with '<' as a hint, but it does not parse or validate the XML structure.
Is my data uploaded anywhere?
No — this tool runs entirely in your browser. Your input never leaves your device and it works offline once loaded.
Is it free?
Yes, completely free with no sign-up and no limits.
People also ask
What is the difference between Base64 to XML and a generic Base64 decoder?
Functionally the decoding step is the same Base64-to-bytes operation. This tool is tuned for XML: it interprets the decoded bytes as UTF-8 so markup with accents or other scripts is readable, and it adds a hint about whether the output begins with a '<' tag.
Why would XML be stored or sent as Base64 in the first place?
Base64 turns arbitrary bytes into a plain ASCII string, which makes XML safe to embed inside formats or channels that can mangle raw angle brackets, quotes, or newlines, such as JSON values, URLs, JWT payloads, email, or database text columns.
Can it decode URL-safe Base64?
Yes. It automatically converts the URL-safe characters '-' and '_' back to '+' and '/' before decoding, and it also fixes missing '=' padding, so strings copied from URLs or tokens decode correctly.
Why does my decoded XML show strange or garbled characters?
Garbled characters usually mean the original bytes were not UTF-8, or the Base64 string was truncated or altered in transit. This tool decodes as UTF-8; content originally encoded in another charset such as UTF-16 or Latin-1 may not display as intended.
Does decoding Base64 to XML keep the XML declaration and formatting?
Yes. Base64 decoding returns the exact original bytes, so any XML declaration, indentation, and line breaks that were present before encoding are recovered unchanged.
Is it safe to decode confidential XML here?
The decoding happens entirely in your browser and the input is never sent to a server, so the data stays on your device. As with any tool, avoid pasting secrets on a shared or untrusted computer.
What does the 'Invalid Base64 length' error mean?
Base64 strings have a length that is a multiple of four after padding. A length error means characters are missing or extra, often from an incomplete copy-paste or a stray character mixed into the string.
Can I get XML back into Base64 after editing it?
This page only decodes Base64 into XML. To go the other direction, use a matching encoder such as the XML to Base64 tool, which converts XML text into a Base64 string.
Related tools