XML sitemap generator — turn a list of URLs into sitemap.xml

Paste the absolute URLs of your pages, one per line, and the tool writes a sitemap.xml in the sitemaps.org format, with a last-modified date wherever you give one.

Live demo · real result from this tool

sitemap.xml

<?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/pricing</loc>    <lastmod>2026-09-15</lastmod>  </url>  <url>    <loc>https://example.com/blog/first-post</loc>    <lastmod>2026-08-01</lastmod>  </url></urlset> 
URLs4

Upload to the site root and reference it from robots.txt or submit it in Search Console. Use lastmod only when it reflects a real content change.

Processed on your device — nothing is uploaded.

How to use the XML sitemap generator

  1. In URLs, paste one absolute address per line. To add details to a single page, follow it with | lastmod | changefreq | priority, for example https://example.com/pricing | 2026-09-15.
  2. Optionally pick a Default last modified date for lines that have none.
  3. Leave Default changefreq and Default priority on Omit, or choose a value for every URL.
  4. Tick Priority 1.0 for the home page if you set priorities and want the root URL to stand out.
  5. Copy or download sitemap.xml and check the URL count and any warnings under it.

What it does and when to use it

A sitemap is a list of the pages you want search engines to find. It matters most for new sites with few incoming links, large sites, and pages that sit deep in the navigation. Most CMS platforms build one for you; this tool suits static sites, hand-built landing pages, or a quick sitemap for a staging check.

Pair it with the robots.txt generator, which can point crawlers at the file. If you want to tidy or inspect an existing sitemap, the XML formatter indents it and the XML minifier shrinks it again.

How it works

Each line is split at |, tabs or spaces. The first part must parse as an http or https URL. In the rest of the line the tool looks for a date (anything starting with YYYY-MM-DD), a changefreq word (always, hourly, daily, weekly, monthly, yearly or never) and a priority between 0 and 1.0, in any order. Values on a line beat the defaults.

Characters such as & are escaped as XML entities, and the output uses the http://www.sitemaps.org/schemas/sitemap/0.9 namespace from the sitemaps.org protocol. It also warns when URLs come from more than one host.

Worked examples

The sample list. The four default URLs give URLs: 4; two of them carry their own date:

  <url>
    <loc>https://example.com/pricing</loc>
    <lastmod>2026-09-15</lastmod>
  </url>

A messy list. Five lines for shop.example.com with Default priority 0.5 and the home-page box ticked. The #reviews duplicate is merged, /contact is skipped as relative, and the blog URL triggers the warning “https://blog.example.com/tea is on a different host from shop.example.com”. The home page gets <priority>1.0</priority> and the kettles page keeps its own <changefreq>weekly</changefreq>. Result: URLs: 3.

Query strings. https://example.com/?a=1&b=2 becomes <loc>https://example.com/?a=1&amp;b=2</loc>, which is what valid XML needs.

Limits and tips

  • The tool does not crawl your site. It only lists what you paste, so it will not notice missing or broken pages.
  • It writes one urlset file. Image, video and news extensions and sitemap index files are not generated.
  • List only pages you want indexed: no redirects, no pages marked noindex, and one version of each URL (with or without the trailing slash, not both).

Frequently asked questions

Where do I put the sitemap file?
Upload it to the root of the site, so it opens at an address such as https://example.com/sitemap.xml. Then add a Sitemap line to robots.txt or submit the address in Google Search Console.
Why are changefreq and priority set to Omit?
Google has said it ignores both values, so leaving them out keeps the file short. Other search engines may read them. You can still set a default for every URL, or add a value to a single line.
What date should I use for lastmod?
The date the main content of that page last changed, in YYYY-MM-DD form. Do not set every page to today's date; a lastmod that changes without a real edit teaches search engines to distrust it.
Why was one of my URLs skipped?
Sitemap URLs must be absolute, starting with http:// or https://. A path such as /contact is skipped with a warning. Duplicate URLs are dropped silently, and a #fragment is removed, so /kettles and /kettles#reviews count as one page.
How many URLs can one sitemap hold?
The protocol allows 50,000 URLs and 50 MB uncompressed per file. Above 50,000 the tool warns you; split the list into several files and list them in a sitemap index.

Written by the ToolsRift team · Last updated

Pages are drafted with AI assistance and checked by automated tests. How we write and check pages.

Was this tool useful?

Report a problem

Start typing to search every tool.

↑ ↓ to moveEnter to openEsc to close