HandyTools Hub

XML Sitemap Generator

Paste a URL list and get a valid sitemap.xml — no crawling, all in your browser

ℹ️

This tool builds the sitemap from the URL list you paste — it does NOT crawl your website.

URL List

Generated sitemap.xml

Enter URLs above to generate your sitemap...

A sitemap generator turns a plain list of page URLs into a valid XML sitemap in the sitemaps.org 0.9 format. Paste one absolute URL per line, optionally set global lastmod, changefreq, and priority values, and the tool trims, validates, deduplicates, and XML-escapes every line before emitting the <urlset> document. It builds strictly from the list you provide — it never fetches or crawls a site, so it cannot discover URLs on your behalf.

Building a Sitemap from a URL List

  1. Export your URLs from a CMS, static-site build, server log, or a query against your pages table. Keep only pages you want indexed.
  2. Paste the list into the input, one absolute URL per line. Lines are trimmed; blank lines are ignored.
  3. Optionally set a global change frequency, priority (0.0–1.0), and lastmod date. Leave any of them on 「Omit」 to drop the element entirely.
  4. Read the warning panel. Invalid lines are listed with their line numbers, and a duplicate counter tells you how many repeats were dropped.
  5. Copy the XML, or download it directly as sitemap.xml.
  6. Host it at your site root, reference it from robots.txt, and submit it in Search Console.

Worked Example: Three URLs In, One Sitemap Out

Given this input, with lastmod 2026-09-11, changefreq weekly, and priority 0.8:

https://example.com/
https://example.com/about
https://example.com/blog/?tag=js&page=2

The output is:

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/</loc>
    <lastmod>2026-09-11</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
  <url>
    <loc>https://example.com/about</loc>
    <lastmod>2026-09-11</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
  <url>
    <loc>https://example.com/blog/?tag=js&amp;page=2</loc>
    <lastmod>2026-09-11</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
</urlset>

Notice the & in the query string became &amp; so the XML stays well formed. Paste https://example.com/about twice and the second copy is dropped as a duplicate; paste example.com/about or ftp://example.com/file and those lines are reported as invalid rather than breaking the file.

The Optional Elements Explained

ElementAccepted valuesPractical guidance
lastmodW3C date, e.g. 2026-09-11, or full ISO 8601Use real per-page modification dates when you can; otherwise omit
changefreqalways, hourly, daily, weekly, monthly, yearly, neverA hint only; Google ignores it, so omit unless another engine consumes it
priority0.0–1.0, one decimalRelative within one site only; clamped, and ignored by Google

Limits and Failure Modes

  • Size limits: one file may hold 50,000 URLs or 50 MB uncompressed. Larger sites need a sitemap index pointing at several sitemap files.
  • Deduplication is exact and case-sensitive. https://example.com/About and https://example.com/about both survive, as do URLs differing only by a trailing slash. Canonicalise before pasting.
  • It validates syntax, not reachability. new URL() accepts a URL that is well formed but returns 404 or redirects. The generator will happily include it.
  • No compression. If you want sitemap.xml.gz, gzip the downloaded file yourself; that is valid and still within the 50 MB limit.
  • Escaping covers &, <, >, ", and ', so query strings and unusual paths survive intact.

When You Need a Sitemap Index

For sites above 50,000 URLs, or content split cleanly by section, publish several sitemap files and a top-level index. The index uses a different root element, <sitemapindex>, and points at each child file with its own <loc> and optional <lastmod>:

<?xml version="1.0" encoding="UTF-8"?>
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <sitemap>
    <loc>https://example.com/sitemap-products.xml</loc>
    <lastmod>2026-09-11</lastmod>
  </sitemap>
  <sitemap>
    <loc>https://example.com/sitemap-blog.xml</loc>
    <lastmod>2026-09-11</lastmod>
  </sitemap>
</sitemapindex>

Each child holds up to 50,000 URLs, so an index of two files covers 100,000 pages and so on. Reference only the index in robots.txt; crawlers discover the children through it. This generator produces a single flat sitemap, so for very large sites generate it per section and assemble the index by hand.

Common Mistakes

  • Listing redirected, canonicalised-away, or 404 URLs — crawlers waste budget on them.
  • Stamping every build with today’s lastmod, which makes the field meaningless.
  • Believing priority influences rankings. It only expresses relative importance within your own site.
  • Using relative or protocol-relative URLs. Every loc must be absolute and start with http:// or https://.
  • Pointing robots.txt at sitemap-index.xml when you only published sitemap.xml.
  • Mixing http and https, or www and non-www, so the same page appears twice.

Frequently Asked Questions

Does this generator crawl my website to discover URLs?

No. It only builds a sitemap from the URL list you paste in, one URL per line. It never fetches, crawls, or probes your site. Export the URL list from your CMS, framework, or an existing sitemap first, then paste it here.

What happens to lines that are not valid URLs?

Blank lines are skipped silently. Non-empty lines that are not absolute http or https URLs (for example `example.com/about`, `ftp://...`, or a stray heading) are reported as warnings with their original line numbers and left out of the XML. The rest of the sitemap is still generated correctly.

Do I have to include changefreq and priority?

No. Both are optional hints, and Google has publicly ignored them for years. Choose 「Omit」 to leave either one out. If you do set them, they are copied to every URL and are valid according to the sitemaps.org schema.

How many URLs can a single sitemap hold?

The sitemaps.org limit is 50,000 URLs and 50 MB uncompressed per file. If you exceed that, split the list into labelled sitemaps (for example sitemap-1.xml, sitemap-2.xml) and write a separate sitemap index that points to each one.

What date format does lastmod need, and can I omit it?

lastmod accepts a W3C datetime; the date-only form YYYY-MM-DD is the safest and is what the tool fills in by default. If you cannot supply each page's real modification date, choose 「Omit」 — an inaccurate lastmod is worse than none because crawlers may stop trusting the field.

Where do I host the file and how do I tell search engines about it?

Upload the downloaded sitemap.xml to your site root so it resolves at https://yourdomain.com/sitemap.xml. Add a line `Sitemap: https://yourdomain.com/sitemap.xml` to robots.txt, then submit the URL once in Google Search Console or Bing Webmaster Tools.

Reviewed by the HandyTools Hub team · Last updated