Sitemap URL XML Escaper
Escapes URLs so they are valid inside sitemap XML.
Use the tool
Why this tool exists
A raw ampersand in a sitemap makes the XML invalid. So do spaces and some characters in URLs.
This tool percent-encodes unsafe characters and then applies the XML entity escapes from sitemaps.org (& ' " > <). By default it leaves existing entities alone so you do not get &amp;.
How to use it
- Paste raw URLs, one per line.
- Choose whether to wrap them in loc tags.
- Leave the other options as they are for most cases.
- Copy the result.
Frequently asked questions
Why does & become &?
XML needs it. The crawler reads it back as &.
What about double escaping?
Keep the entity option on to avoid it.
Does it change %20?
No, existing percent-escapes are kept.
Do I need this if I use a generator?
Good generators do it already. This is for hand-made lists.