Tools

Home
JSON FormatterSQL FormatterJS ValidatorMinify CSS
Merge PDFCompress PDFImage to PDF
JPG to PNGPNG to WebPCrop Image

Convert Base64 to XML

Decode Base64-encoded text to XML. Paste Base64, get formatted XML output. 100% client-side.

Your files never leave your browser
Base64 Input0 chars, 0 lines
XML Output0 chars, 0 lines
Error:
    Ready·

    Paste a Base64-encoded string, get formatted XML back in one click — no decoding step, no separate formatter. Useful when you're pulling encoded SOAP payloads from API logs or inspecting SAML assertions buried in auth responses.

    The tool decodes, validates the XML structure, and indents everything so you can actually read it. And everything runs in your browser. Nothing gets uploaded.

    How It Works

    Paste Base64
    →
    Decode & Parse XML
    →
    Formatted Output

    The tool runs JavaScript's atob() to decode the Base64 into raw text, then feeds that text into the browser's built-in DOMParser to check if it's valid XML. If parsing succeeds, it serializes the document back out with proper indentation — 2 or 4 spaces, your pick. If something's wrong with the input, you get a specific error message instead of a blank screen.

    Examples

    Simple Config File

    A short app config was Base64-encoded inside a JSON response. You need to see the actual settings.

    INPUT
    PD94bWwgdmVyc2lvbj0iMS4wIj8+PGNvbmZpZz48ZGI+PGhvc3Q+bG9jYWxob3N0PC9ob3N0Pjxwb3J0PjU0MzI8L3BvcnQ+PC9kYj48L2NvbmZpZz4=
    OUTPUT
    <?xml version="1.0"?> <config> <db> <host>localhost</host> <port>5432</port> </db> </config>

    SOAP Envelope from an API Log

    You pulled a Base64 blob from a request log and need to verify the SOAP body before filing a bug report.

    INPUT
    PHNvYXA6RW52ZWxvcGUgeG1sbnM6c29hcD0iaHR0cDovL3NjaGVtYXMueG1sc29hcC5vcmcvc29hcC9lbnZlbG9wZS8iPjxzb2FwOkJvZHk+PEdldFVzZXI+PElkPjQyPC9JZD48L0dldFVzZXI+PC9zb2FwOkJvZHk+PC9zb2FwOkVudmVsb3BlPg==
    OUTPUT
    <soap:Envelope xmlns:soap="..."> <soap:Body> <GetUser> <Id>42</Id> </GetUser> </soap:Body> </soap:Envelope>

    SVG Image Data Embedded in a JWT

    A token payload contains an SVG icon as Base64 XML. Quick decode to check if the markup looks right.

    INPUT
    PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCI+PGNpcmNsZSBjeD0iMTIiIGN5PSIxMiIgcj0iMTAiIGZpbGw9IiM2MzY2ZjEiLz48L3N2Zz4=
    OUTPUT
    <svg xmlns="..." width="24" height="24"> <circle cx="12" cy="12" r="10" fill="#6366f1"/> </svg>

    Who Uses This

    👨‍💻 Backend Developers

    Decoding XML payloads from API logs, message queues, or webhook bodies that got Base64-wrapped for transport.

    🔧 QA Engineers

    Inspecting SOAP responses and encoded config files during integration testing without installing extra software.

    🛡️ Security Analysts

    Examining Base64 blobs in SAML assertions, JWT claims, or suspicious payloads to check the raw XML content.

    📊 Data Engineers

    Previewing XML data exports that arrive Base64-encoded in ETL pipeline outputs or database fields.

    Common Mistakes

    Pasting the Base64 with a data URI prefix

    Strings like data:application/xml;base64,PD94bW... will fail. Strip everything before the comma — only the Base64 characters should go in the input box.

    Missing or extra padding characters

    Base64 strings must have a length divisible by 4. If yours ends with random characters instead of = or ==, the encoding was likely truncated. Check the source for the full string.

    The decoded text isn't actually XML

    Sometimes what looks like it should be XML turns out to be JSON, plain text, or even a binary file that was Base64-encoded. If you get a parse error, try a plain Base64 decoder first to see the raw output before assuming the XML is broken.

    Technical Details

    Frequently Asked Questions

    How do I convert Base64 to XML?

    Paste your Base64 string into the input box and click Convert. The tool decodes the Base64 text and parses it as XML automatically. If the string is valid, you'll get formatted XML with proper indentation right away.

    Why is my Base64 string not decoding?

    The most common culprit is extra whitespace or line breaks in the string. Some systems split Base64 across multiple lines with \n characters. Remove those first. Also check for stray characters at the start — things like data:application/xml;base64, need to be stripped off before the input will work.

    Is it safe to paste sensitive XML data here?

    Yes. The conversion runs entirely in your browser using JavaScript. Your data never leaves your device — there are no server requests, no logging, no analytics on the input. Close the tab and it's gone.

    Can this tool handle large Base64 strings?

    It handles strings up to several megabytes without issues on most modern browsers. Really massive files (10MB+) might make the browser slow down during formatting, but the decode itself is fast. For huge files, a command-line tool might be more practical.

    What's the difference between Base64 and Base64URL encoding?

    Standard Base64 uses + and / as special characters, while Base64URL swaps those for - and _ to be safe in URLs. This tool expects standard Base64. If your string came from a URL or JWT, replace - with + and _ with / before pasting.

    Share: