Skip to main content

XML sitemap builder and validator

Validate HTTP/HTTPS URLs, remove duplicates and generate a clean XML sitemap.

  • Clipboard

Embed this widget

Customize the result, check the live preview, then copy the code.

Preview

Embed code type

Code to copy

Responsive and automatically resized by Bethemesh.

XML sitemap

Was this tool useful?

How does this tool work?

This generator turns a list of URLs into an XML sitemap that follows the Sitemaps 0.9 protocol read by Google, Bing and other search engines. It checks every line, removes duplicates, escapes special characters and produces a file ready to publish, updated as you type.

Each line is read as a URL: only absolute http or https addresses are kept. An invalid line turns the status red, but valid URLs stay in the result.

URLs are normalised by the browser (lower-case domain, special characters encoded), which removes duplicates that differ only in the domain’s case.

Reserved XML characters are escaped: & becomes &, as the Sitemaps protocol requires for URLs with parameters.

The file contains the XML declaration, the <urlset> element with the protocol namespace and one <url><loc> entry per address; the status shows the number of valid URLs.

How to use this tool

  1. Paste the URLs

    One absolute URL per line in the Sitemap URLs field.

  2. Watch the status

    Sitemap ready in green, or a warning in red if some lines are invalid, with the number of valid URLs.

  3. Copy the XML

    The XML sitemap updates automatically with every change.

  4. Publish and declare

    Save the sitemap.xml file at the site root, add a Sitemap: line to robots.txt and submit it in Search Console.

Use cases

Create a sitemap for a small site

List the pages of a brochure site or landing page without a server-side generator.

Prepare a targeted sitemap

Group the new pages of a section to submit them in Search Console.

Check an exported list

Spot invalid lines in a CMS or crawler export before publishing the file.

Examples

List with a duplicate, an invalid line and parameters

https://Example.com/about is recognised as a duplicate once the domain is lower-cased; example.com/contact, with no scheme, is dropped; the & in the product URL is escaped as &amp;.

Input

Sitemap URLs:
https://example.com/
https://example.com/about
https://Example.com/about
example.com/contact
https://example.com/produits?id=1&couleur=bleu

Result

Some lines are not valid HTTP/HTTPS URLs. · Valid URLs: 3
<?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/produits?id=1&amp;couleur=bleu</loc></url>
</urlset>

Tips and best practices

  • A sitemap file is limited to 50,000 URLs and 50 MB uncompressed: beyond that, split it and create a sitemap index.
  • Include only canonical, indexable URLs that return 200: no redirects, noindex pages or parameter duplicates.
  • The optional lastmod, changefreq and priority tags are not generated; Google ignores the last two and uses lastmod only when it is reliable.
  • A sitemap does not guarantee indexing: it helps search engines discover pages, which still have to earn their place in the index.

Sources and references

Frequently asked questions

Where should the sitemap.xml file go?

Usually at the site root (https://example.com/sitemap.xml). A sitemap can only list URLs from its own host and from directories below its location, unless it is declared in robots.txt.

Why does & become &amp;?

A sitemap is an XML file, where & starts an entity. The Sitemaps protocol requires &, <, >, " and ' to be escaped in URLs; otherwise the file is invalid.

Should I add lastmod?

It is not required. Google uses lastmod only if it truly reflects the page’s last significant change. Add it by hand if your CMS provides a reliable date.

Do invalid URLs block the result?

No. They are left out of the XML and the status flags them in red; the valid URLs remain usable.

Are my URLs sent to a server?

No. The sitemap is generated in your browser.

Related tools

Tools similar or complementary to this one.

Similar tools

Create a clear robots.txt file to guide web crawlers.

Web & SEOFeaturedUse this tool

Compare two sitemaps or URL lists and identify added and removed URLs.

Web & SEOUse this tool

Create SEO, Open Graph and Twitter/X tags for a web page.

Web & SEOFeaturedUse this tool