XML URL Encoding
Paste XML and percent-encode it for URLs, query strings, form posts, redirects, or logs.
Last updated: May 28, 2026
Find this tool useful? Support the project to keep it free!
Buy me a coffeeWhat is XML URL Encoding?
XML URL Encoding converts characters such as <, >, quotes, spaces, and line breaks into URL-safe percent-encoded sequences. This is useful when XML needs to travel inside a query parameter, application/x-www-form-urlencoded body, redirect URL, webhook debug link, or log field that cannot safely contain raw markup.
How to Use XML URL Encoding
Paste XML into the input panel.
Keep validation enabled if the source should be well formed.
Enable pretty-print before encoding if you want stable whitespace.
Choose spaces-as-plus for form-encoded payloads or double encoding for nested URL values.
Copy or download the encoded output.
Common Use Cases
- Encoding XML snippets for query parameters.
- Preparing XML values for form-encoded POST bodies.
- Debugging SOAP payloads inside redirect URLs.
- Embedding XML in logs or URLs without breaking delimiters.
Example Input and Output
A simple XML status node becomes URL-safe text.
<status ok="true">Ready</status>%3Cstatus%20ok%3D%22true%22%3EReady%3C%2Fstatus%3EPrivacy
XML is encoded locally in your browser and is never sent to a server.
Frequently Asked Questions
What does XML URL encoding do?
It applies percent encoding to XML so reserved URL characters are safe inside query strings or form bodies.
Should spaces be encoded as + or %20?
Use + for application/x-www-form-urlencoded payloads. Use %20 for normal URL component encoding.
What is double encoding?
Double encoding encodes the already encoded result. It is only needed when an encoded XML value is itself placed inside another encoded URL value.
Is my XML uploaded?
No. Encoding and optional validation happen in your browser.
Related Tools
XML URL Decoding
Decode URL-encoded XML strings back to readable XML with optional repeated decoding, plus-as-space handling, and pretty printing.
URL Encoder/Decoder
Encode and decode URL strings with special characters.
XML Stringify Online
Stringify XML into a safe JavaScript or JSON string literal with validation, optional compacting, and copy/download output.
XML Pretty Print
Pretty-print XML online with clean indentation, optional comments, XML declaration controls, and validation errors.
XML Validator
Validate XML syntax online. Shows valid/invalid status with exact error line and column, plus structure stats including root element name and element count.
XML Editor Online
Edit, validate, format, and minify XML in your browser. Real-time syntax validation with error line detection, pretty-print with configurable indent, and minification.

