Loading XML URL Decoder...
Please wait a moment

How to URL Decode XML Data - Step by Step Guide

Step 1

Paste or upload the encoded XML

Got a long run of %3C and %20 from a query parameter or a log line? Paste the percent-encoded XML into the input box, or upload a .txt file that holds it. Decoding starts as soon as you stop typing.

Example: Try This URL-Encoded XML

Copy and paste this encoded XML to see how it works:

%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%0A%3Cuser%3E%0A%20%20%3Cname%3EDavid%20Kim%3C%2Fname%3E%0A%20%20%3Cemail%3Edavid%40example.com%3C%2Femail%3E%0A%20%20%3Csearch%3Exml%20to%20table%20%26amp%3B%20converter%3C%2Fsearch%3E%0A%20%20%3Cactive%3Etrue%3C%2Factive%3E%0A%3C%2Fuser%3E
Step 2

Read the decoded XML

The decoded text shows up on the right with XML syntax colouring. Line breaks and indentation are whatever was encoded: the page does not reformat anything. A green badge means the browser's XML parser accepted it; an amber one comes with the line and column of the first problem.

Decoded XML Output

The example above decodes to this (185 characters, down from 303):

<?xml version="1.0" encoding="UTF-8"?>
<user>
  <name>David Kim</name>
  <email>[email protected]</email>
  <search>xml to table &amp; converter</search>
  <active>true</active>
</user>
Step 3

Copy or download it

Copy the decoded XML or download it as decoded.xml, then load it into your own code with a DOMParser or any XML library. Going the other way? The XML URL Encoder turns XML into a URL-safe string.

•
Processing API responses with URL-encoded XML data
•
Analyzing query parameters from web services
•
Debugging SOAP requests and XML transmissions
•
Extracting configuration data from encoded URLs

What is XML URL Decoding?

XML URL decoding is the process of converting URL-encoded XML data back to its original, readable format. This is essential when working with web services, SOAP APIs, or any system that transmits XML data through URLs where special characters have been percent-encoded.

Each %XX code is turned back into the character it stands for, using UTF-8 for anything outside plain ASCII, so a %C3%A9 becomes é again. The page then hands the result to the browser's XML parser to tell you whether it is well-formed, but it leaves the text itself alone.

Frequently Asked Questions

When would I need to URL decode XML data?

Whenever XML has travelled inside a URL or a form field. You will find it in SOAP and REST logs, in redirect and callback parameters (SAML responses are a common one), in query strings copied from the browser address bar, and in config values someone stored in encoded form. Decoding turns %3C, %3E, %20 and friends back into the tags and spaces you can actually read.

Does the tool check the XML after decoding it?

It runs the decoded text through your browser's XML parser. A green Well-formed XML badge means the parser accepted it. If it didn't (an unclosed tag, a bare & that should be &amp;, a missing quote), the badge turns amber and a note gives the line, column and reason. It only checks that the XML is well-formed; it does not validate against a schema or DTD.

What happens to a stray % or a broken escape?

A bare decodeURIComponent gives up on the whole string when it meets something like 100% or a cut-off %C3. This page decodes everything it can and keeps each bad spot exactly as typed, then tells you where the first one is. Plus signs are kept as plus signs, because that is what decodeURIComponent does. If your text came from a submitted HTML form, where + means a space, swap each + for %20 first.

Will decoding change any of my values?

No. The output is the decoded text and nothing else. It is not re-indented or re-ordered, entities such as &amp; stay as written, and numbers like 8901240544102066246, 00501 or 14.50 come out exactly as they went in. The only thing dropped is an invisible byte-order mark at the very start of the input.

Is decoded XML safe to open in other tools?

Decoding only reverses the percent-encoding, so you get back whatever was encoded, good or bad. On this page the result is shown as plain text in the editor and is never run or rendered. Treat XML from logs or unknown senders like any other untrusted input before you feed it to a parser that resolves external entities.

Is the XML URL decoder free, and is my data sent anywhere?

It is free and needs no sign-up. Decoding happens in your browser, so what you paste or upload is not sent to our server. Inputs of a few megabytes work, though the editor slows down on very large files.