XML Sitemap Generator and Validator
Build sitemap.xml from a list of URLs, or validate an existing sitemap.
Use via API
Generate sitemap.xml from a list of URLs (with optional lastmod, changefreq and priority), validated against the sitemaps.org protocol. Send JSON, get JSON back.
POST https://pithlab.com/api/v1/tools/sitemap-generator
curl https://pithlab.com/api/v1/tools/sitemap-generator \
-H "Authorization: Bearer $PITHLAB_KEY" \
-H "Content-Type: application/json" \
-d '{"urls":"https://example.com/, 2026-10-01, daily, 1.0\nhttps://example.com/about\nhttps://example.com/blog/first-post","changefreq":"monthly"}'About the XML Sitemap Generator
Turn a list of URLs into a valid XML sitemap with lastmod, changefreq and priority, split large lists with a sitemap index, or check an existing sitemap.
How to use the XML Sitemap Generator
- Paste your page URLs, one per line. They must be full URLs starting with https:// or http://.
- Optionally set a default lastmod date, changefreq and priority, or add them after a URL on its own line, such as https://example.com/, 2026-01-01, 0.8.
- Check the warnings for invalid lines, duplicates and URLs on other hosts, then copy or download sitemap.xml.
- To check a sitemap you already have, switch to Check a sitemap and paste its XML.
Examples
Input
https://example.com/ https://example.com/about, 2026-01-01, 0.8 (default changefreq: monthly)
Output
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://example.com/</loc>
<changefreq>monthly</changefreq>
</url>
<url>
<loc>https://example.com/about</loc>
<lastmod>2026-01-01</lastmod>
<changefreq>monthly</changefreq>
<priority>0.8</priority>
</url>
</urlset>
Input
https://example.com/search?q=tea&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/search?q=tea&page=2</loc>
</url>
</urlset>
Frequently asked questions
Do lastmod, changefreq and priority matter?
Google uses lastmod when it is consistently accurate, so only set it to when the page content really changed. Google ignores changefreq and priority, though other search engines may read them. Leaving them out is fine.
What happens with more than 50,000 URLs?
A single sitemap may hold at most 50,000 URLs and 50 MB uncompressed. Above that the tool splits the list into sitemap-1.xml, sitemap-2.xml and so on, plus a sitemap-index.xml that lists them. Upload them all and submit only the index.
Why does it warn about URLs on different hosts?
A sitemap should only list URLs on the same host as the sitemap itself, for example all on https://www.example.com. URLs on other hosts or subdomains are ignored unless you have verified ownership of both in Search Console.
Why are & and quotes changed in the output?
Sitemaps are XML, so &, <, >, ' and " must be written as entities such as &. The tool also percent-encodes spaces and non-ASCII characters, as the protocol requires URLs to be properly encoded.
Is my sitemap uploaded anywhere?
No. The sitemap is built and checked entirely in your browser, and the checker reads the XML you paste without fetching any URLs.