XML Sitemap Generator
Turn a list of URLs into a standards-compliant XML sitemap in your browser. Your URLs stay on your device.
The URLs you paste are turned into a sitemap locally in your browser and are never uploaded, so your unpublished or internal page list stays private.
Need a robots.txt too? Try the Robots.txt Generator.
About XML Sitemap Generator
This XML sitemap generator turns a plain list of page URLs into a standards-compliant sitemap.xml that search engines like Google and Bing can read. Paste one URL per line, then optionally add a shared lastmod date, a default changefreq, and a default priority, and the tool wraps every URL in a <url><loc> entry inside a <urlset> using the sitemaps.org 0.9 schema. Special characters such as &, <, >, quotes, and apostrophes are XML-escaped automatically, blank lines are skipped, and each line is trimmed so a copied list works as-is. It is built for SEO specialists, developers, and site owners who need a sitemap without spinning up a crawler. Everything happens in your browser, so the URLs you paste are processed locally and never leave your device.
Features
- Converts a one-URL-per-line list into a valid <urlset> sitemap.xml
- Uses the sitemaps.org 0.9 schema with a proper UTF-8 XML declaration
- Optional shared <lastmod> date applied to every URL in ISO yyyy-mm-dd form
- Optional default <changefreq> from always, hourly, daily, weekly, monthly, yearly, or never
- Optional default <priority> from 0.0 to 1.0, clamped and formatted automatically
- XML-escapes &, <, >, double quotes, and apostrophes in every URL
- Trims each line, skips blanks, shows a live URL count, and flags non-http(s) lines
- Copy the sitemap or download it as sitemap.xml with one click
How to use the XML Sitemap Generator
- Paste your page URLs into the box, one per line.
- Toggle lastmod and pick a date, or set a default changefreq and priority if you want them.
- Watch the sitemap.xml build live in the output panel as you type.
- Click Copy or Download to save sitemap.xml and upload it to your site root.
Example
Input
https://example.com/
https://example.com/about
https://example.com/blog?id=1&page=2
Output
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/</loc>
</url>
<url>
<loc>https://example.com/about</loc>
</url>
<url>
<loc>https://example.com/blog?id=1&page=2</loc>
</url>
</urlset>
The & in the last URL is escaped to & so the XML stays well-formed.
Common errors & troubleshooting
- The output warns that some lines don't look like an http(s) URL. — Sitemaps need absolute URLs that start with http:// or https://. Fix relative paths like /about into full URLs; flagged lines are still included so you can spot typos.
- Search Console rejects the file with an "Invalid XML" or encoding error. — Save the downloaded sitemap.xml as UTF-8 and serve it as application/xml. The generated declaration already states UTF-8, so re-saving in a different encoding is the usual cause.
- A priority like 0.85 shows up as 0.8 in the output. — Priority is rounded to one decimal place and clamped to the 0.0–1.0 range the protocol allows, so 0.85 becomes 0.8 and values above 1 become 1.0.
- Your sitemap has thousands of URLs and the validator complains about size. — A single sitemap is capped at 50,000 URLs and 50 MB uncompressed. Split larger sites into multiple sitemaps and list them in a sitemap index file.
Frequently asked questions
- What is an XML sitemap and why do I need one?
- An XML sitemap is a sitemap.xml file that lists the URLs on your site so search engines can discover and crawl them more efficiently. It is especially useful for large sites, new sites, or pages that are not well linked internally.
- What changefreq and priority values are valid?
- changefreq must be one of always, hourly, daily, weekly, monthly, yearly, or never. priority is a number from 0.0 to 1.0, where 1.0 is the most important. Both are optional hints, and major search engines treat them as suggestions rather than rules.
- How many URLs can a single sitemap hold?
- The sitemaps.org protocol limits one sitemap to 50,000 URLs and 50 MB uncompressed. If you have more, generate several sitemaps and reference them from a sitemap index file.
- What format should the lastmod date use?
- Use the W3C date format. This tool outputs lastmod as an ISO yyyy-mm-dd date such as 2026-06-27 and applies the same date to every URL, which is valid and widely supported.
- Where do I put the generated sitemap.xml file?
- Upload it to your site, usually at the root like https://example.com/sitemap.xml, then submit that URL in Google Search Console or Bing Webmaster Tools and reference it in your robots.txt with a Sitemap line.
- Are my URLs uploaded when I generate the sitemap?
- No. The sitemap is built entirely in your browser using client-side JavaScript, so the list of URLs you paste is processed locally and never leaves your device.
Related tools
All ArrayKit tools