Advertisements

headerup to 320x100 / 728x90

XML URL Encoder / Decoder

Percent-encode or decode an XML payload for safe transmission in query strings and URLs

Mode:
Input
Loading editor...
Output

Output will appear here...

Advertisements

content bottomup to 300x250

What is XML URL Encoder / Decoder

Last reviewed:

XML (Extensible Markup Language) is a strict, tag-based format used for documents, SOAP APIs, RSS feeds, and many enterprise and publishing systems.

XML URL Encoding applies encodeURIComponent (encode direction) or decodeURIComponent (decode direction) to your XML payload, producing a URL-safe string or reconstructing the original XML from one.

It is the standard approach for embedding XML inside query strings, webhook URLs, OAuth redirects, and tracking pixels.

Why use it

  • Pass XML through query strings safely.
  • Embed SOAP payloads in redirect URLs.
  • Prepare SVG data for data URLs.
  • Encode XML for OAuth callback tracking.
  • Decode captured URLs during debugging.

Features

  • Encode and decode directions
  • RFC 3986 compliant (spaces → %20)
  • Handles attributes, CDATA, Unicode
  • XML URL is handled entirely in-browser
  • Ideal for query strings and OAuth flows

How to use XML URL Encoder / Decoder

  1. Choose mode. Pick Encode or Decode.
  2. Paste XML or encoded text. Drop the input.
  3. Run. Copy the percent-encoded or decoded output.

Example (before/after)

XML

<request path="/api/v1">ping</request>

URL-encoded

%3Cnote%20id%3D%221%22%3EHello%3C%2Fnote%3E

Common errors

Double encoding

Running encode twice breaks decoding.

Fix: Decode first to check the state.

Spaces vs plus signs

URL query fields sometimes use + for space.

Fix: This tool uses RFC 3986 style (spaces → %20).

FAQ

Is it RFC 3986 compliant?

Yes — it follows encodeURIComponent rules, which align with RFC 3986.

How do I handle + vs %20?

Replace %20 with + manually if embedding in a form field.

Does it validate the XML?

No — run XML Parser separately for validation.

Is input uploaded?

No — processing is client-side only.

Can I chain it with stringify?

Yes — stringify first, then URL-encode the resulting string.