LectionFree Tool

XML Sitemap Generator

Create a clean sitemap.xml from your URL list. Set changefreq, priority, and lastmod per URL, then copy or download ready-to-submit XML for free.

Free XML sitemap generatorGenerate sitemap.xml onlineCopy or download output
Free to runNo credit cardStructured results
Try:
One URL per line. Optionally add per-line overrides with a pipe, for example: https://example.com/shoes | weekly | 0.8. Lines without overrides use the defaults below.
Adds a <lastmod> tag dated today. Replace it with each page's real last-modified date before submitting.

Uses the sitemaps.org URLset protocol accepted by Google and Bing.

What is an XML sitemap generator?

An XML sitemap is a file that lists the URLs you want search engines to crawl, along with optional signals such as when each page last changed, how often it changes, and how important it is relative to other pages. A free XML sitemap generator turns a plain list of URLs into a valid sitemap.xml file that follows the sitemaps.org protocol.

Writing the file by hand is easy for three URLs and painful for three hundred. Generators also catch the mistakes that invalidate a sitemap, such as unescaped ampersands in query strings, relative URLs, or duplicate entries. That is why most technical SEO checklists start with generating a clean file, validating it, and submitting it in Google Search Console and Bing Webmaster Tools.

A sitemap does not guarantee that every URL gets indexed. It is a discovery aid that helps crawlers find pages they might otherwise miss, especially newly published content, deep category pages, and sites with client-side rendering. For most sites, the practical setup is a single sitemap.xml under 50,000 URLs, or a sitemap index that groups multiple sitemaps.

How to use the XML sitemap generator

Step 1

Paste your URLs

Add one URL per line. Use the per-line override format url | changefreq | priority for pages that differ from your site-wide defaults.

Step 2

Set the defaults

Choose a default changefreq, priority, and whether to include lastmod. Pages without overrides use these values.

Step 3

Generate and submit

Copy the XML or download sitemap.xml, upload it to your server root, then submit the URL in Search Console and Bing Webmaster Tools.

Read the generated output from top to bottom. The loc tag must contain the full absolute URL, escaped for XML. lastmod uses the ISO 8601 date format YYYY-MM-DD. changefreq accepts always, hourly, daily, weekly, monthly, yearly, or never. priority accepts any value from 0.0 to 1.0.

For example, an ecommerce site might mark the homepage with weekly | 1.0, category pages with weekly | 0.8, product pages with monthly | 0.6, and the returns policy with yearly | 0.2. The values are hints for crawlers, not ranking signals, so keep them honest and stable instead of inflating every priority to 1.0.

<?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-08-04</lastmod>
    <changefreq>weekly</changefreq>
    <priority>1.0</priority>
  </url>
</urlset>

Common Use Cases

  • Generating a first sitemap.xml before submitting a new site in Google Search Console.
  • Standardizing changefreq and priority values across ecommerce category and product pages.
  • Rebuilding sitemaps after a migration, URL restructure, or new content hub launch.
  • Providing a clean URL list to developers or CMS editors instead of hand-editing XML.
  • Preparing per-language or per-region URL lists before splitting them into a sitemap index.

FAQ

What is a free XML sitemap generator used for?
It converts a list of URLs into a valid sitemap.xml file with optional lastmod, changefreq, and priority tags. You paste URLs, choose defaults, and copy or download the finished XML.
What should go in the loc tag?
The full absolute URL of the page, including the protocol and host, such as https://example.com/shoes/running. Relative paths are not valid in sitemap files.
Do I need lastmod, changefreq, and priority on every URL?
No. All three are optional hints. lastmod is the most useful signal when kept accurate, while changefreq and priority are largely ignored by modern crawlers. Only include values you can keep correct.
Where should I upload sitemap.xml after generating it?
Upload the file to the root of your domain, such as https://example.com/sitemap.xml, then submit the URL in Google Search Console and Bing Webmaster Tools. You can also reference it from robots.txt with a Sitemap line.
What is the difference between a sitemap and a sitemap index?
A sitemap lists individual URLs. A sitemap index is an XML file that lists multiple sitemaps, which is required once you pass 50,000 URLs or 50MB per file.
Can I include URLs with query parameters in my sitemap?
Yes, but escape the ampersand as &amp; in the XML. The generator does this automatically. Keep tracking parameters out of sitemaps when possible, since every variant URL you list consumes crawl budget.
Does an XML sitemap improve rankings?
Not directly. It improves discovery for pages that are hard to reach through internal links, which can indirectly help crawl coverage and indexing for newer or deeper pages.

Related Resources

If you want to move from one-off sitemap cleanup to repeatable site analysis, start on the Lection home page or compare workflow depth on the pricing page.

Need fresh data on a schedule? Automate this workflow with a free account.Start Free