Skip to content

XML sitemap generator and validator

Turn a list of your page addresses into a correct sitemap.xml, and check any sitemap you already have. Paste URLs or open a text, CSV or XML file; dates on the same line become lastmod, English and Arabic versions can be paired with hreflang, and lists longer than 50,000 URLs are split with a sitemap index. Nothing is crawled and nothing is uploaded.

Quick answer

An XML sitemap lists the URLs you want search engines to find, each in a url entry with an absolute loc and, if you know it, a lastmod date. One file may hold at most 50,000 URLs and 50 MB; beyond that you split it and list the parts in a sitemap index. Google ignores priority and changefreq but uses lastmod when it is accurate.

Runs in your browser, nothing is uploaded

Based on sitemaps.org: Sitemaps XML format (protocol 0.9, last updated 21 Nov 2016) · Page updated 23 October 2026

Editor: Abuzar, founder of NeedMyToolsHow we check facts

Your URLs, one per line

A date on the same line becomes lastmod: 2026-10-20, 20/10/2026 or a full time with a time zone. A pasted sitemap or a CSV with a header row also works.

Options

Paths such as /about are joined to this address. It is also where the sitemap index points.

Only fill this if those pages really changed on that date: Google uses lastmod only when it is accurate.

Your sitemap

Paste URLs or open a file to see the sitemap.

How to use the XML Sitemap Generator & Validator

  1. Paste your URLs, one per line, or open a file. A date on the same line, such as 2026-10-20 or 20/10/2026, is used as the last-modified date; you can also paste an existing sitemap to clean it.
  2. Type your site address so paths like /about become full URLs, and say whether dates are written day first or month first.
  3. For a bilingual site, tick hreflang: pages under /en/ and /ar/ (or en. and ar. subdomains) are paired, and you can pick the x-default version.
  4. Read the checks, then download sitemap.xml, or a ZIP with the parts and the sitemap index when the list is too long for one file.
  5. Upload the file to your site root, add the Sitemap line to robots.txt and submit the sitemap in Search Console. Use the Validate tab to check any sitemap before you submit it.

What the sitemaps.org protocol requires

The sitemap protocol at sitemaps.org, last updated on 21 November 2016 and read by us on 23 October 2026, is short and strict. The file must be UTF-8, the root element is urlset with the namespace http://www.sitemaps.org/schemas/sitemap/0.9, and every url entry has exactly one loc. A loc must start with the protocol and be shorter than 2,048 characters, and characters such as the ampersand must be written as XML entities, so a link with two query parameters needs & between them. lastmod is optional and uses the W3C Datetime format: a plain date like 2026-10-23, or a full time with a time zone. One sitemap may list at most 50,000 URLs and be no larger than 50 MB (52,428,800 bytes) uncompressed; a sitemap index lists up to 50,000 sitemaps. The generator applies all of these rules and the validator checks them.

What Google does with your sitemap

Google's page on building a sitemap, last updated on 8 July 2026, adds a few practical points. Use full, absolute URLs, the canonical version of each page, and host the sitemap where it covers the URLs it lists; the protocol also says a sitemap at the root of a host covers that whole host, while one in a folder covers only that folder. Google ignores the priority and changefreq values, so this generator does not write them and the validator only notes them. Google does use lastmod when it is consistently and verifiably accurate, so leave dates out rather than stamping every page with today's date. Submit the sitemap in Search Console or point to it from robots.txt with a Sitemap line, which the tool writes for you. A sitemap helps discovery; it does not promise that every URL will be indexed.

Messy lists are fine

Lists exported from a CMS, a spreadsheet or a crawl are rarely clean. The generator accepts lines with tabs, commas or spaces, a header row, quotes, a byte order mark and Arabic-Indic digits in dates. Paths such as /about are joined to your site address, bare domains get https://, fragments such as #form are removed because search engines ignore them, and duplicates are dropped once the URLs are normalised. Arabic paths and Arabic domain names are percent-encoded and converted to punycode, which is what the protocol's URL-escaping rule asks for. Lines that are not web addresses, such as mailto: links, are listed in the checks instead of silently disappearing. Dates that cannot be read, dates in the future and times without a time zone are reported, and dates such as 05/04/2026 follow the day-first or month-first setting you choose.

Language versions: hreflang in the sitemap

Google's page on localized versions, updated on 21 September 2026, lets you list language versions in the sitemap with xhtml:link elements instead of tags in each page. Every url entry must list all versions, including itself. When you tick hreflang, the generator looks for language codes as the first folder (/en/about and /ar/about) or the first part of the host (en.example.com and ar.example.com), checks each code against the ISO lists, and adds the alternates to every page in a matching group. Pages that exist in only one language are left as plain entries. For tags in the page head, or a full return-link check, use our hreflang tag generator.

Large sites: 50,000 URLs and the sitemap index

When your list passes 50,000 URLs, or a file would pass 50 MB, the tool writes sitemap-1.xml, sitemap-2.xml and so on, plus sitemap-index.xml that lists them with the newest lastmod of each part. You download them together as a ZIP. Tell the tool which folder they will live in, so the index points to the right addresses, then submit only the index. In our tests a list of 50,001 URLs with dates was turned into two sitemaps and an index in well under the four-second target in a desktop browser.

Frequently asked questions

How many URLs can one sitemap hold?

Up to 50,000 URLs and 50 MB (52,428,800 bytes) uncompressed, according to the sitemaps.org protocol. For more, split the list into several sitemaps and list them in a sitemap index; this XML sitemap generator does that for you and downloads the files as a ZIP.

Does this sitemap generator crawl my website?

No. It builds the sitemap only from the URLs you paste or open, in your browser. Export the list from your CMS, a spreadsheet or Search Console. Nothing is fetched from your site and nothing is uploaded to our servers.

Should I set priority and changefreq?

You can, but Google says it ignores both. The useful optional field is lastmod, the date the page content really changed, and Google uses it only when it is consistently accurate. That is why the generator writes lastmod and leaves the other two out.

What does the sitemap validator check?

It checks that the XML is well formed, with line numbers for errors, that the root and namespace are right, that every entry has one absolute loc under 2,048 characters, that ampersands are escaped and lastmod dates use the W3C format, the 50,000 URL and 50 MB limits, duplicates, mixed hosts and hreflang return links.

Where do I upload sitemap.xml?

Usually at the root of your site, for example https://www.example.com/sitemap.xml, because a sitemap in a folder only covers URLs inside that folder. Then add the line Sitemap: followed by its full URL to robots.txt and submit it in Search Console.

Related guides