Skip to main content

XML Sitemap Generator

Builds a sitemaps.org XML sitemap from URL rows or a CSV import, with optional lastmod, changefreq, and priority tags. Each URL is percent-encoded and XML-escaped, rows that are not full http or https URLs are left out and listed, and files past 50,000 URLs or mixing hosts are flagged.

Runs entirely in your browser

This tool sends nothing over the network. Everything you enter is processed on your device and never reaches our servers.

Web Development
Search Engine Optimization
Loading the tool
Reference

Documentation

An XML sitemap generator writes the file that lists the URLs a site wants search engines to discover. The format is the sitemaps.org protocol, version 0.9, which Google, Yahoo, and Microsoft support. A sitemap helps crawlers find pages, particularly new or poorly linked ones; it does not guarantee that any page will be crawled or indexed.

The file is a urlset element in the http://www.sitemaps.org/schemas/sitemap/0.9 namespace, encoded as UTF-8, with one url element per page. Each url needs a loc holding the full address; lastmod, changefreq, and priority are optional. One file may hold at most 50,000 URLs and 50 MB uncompressed, and each loc must stay under 2,048 characters. Larger sites split their URLs across several sitemaps and list those files in a sitemap index. Every URL must come from the host that serves the sitemap, and a sitemap placed in a subdirectory, such as /catalog/sitemap.xml, may only list URLs under that directory. Under the URL count, the tool lists rows it left out, URLs over the length limit, lists over 50,000 URLs, and lists that mix hosts. The subdirectory rule depends on where the file is finally served, so it is not checked.

Addresses go through two encoding steps. First, each URL passes through the browser's URL parser, which requires an http or https scheme and a host, turns spaces into %20, percent-encodes non-ASCII path characters as UTF-8 bytes, converts internationalized domain names to punycode, and adds the trailing slash to a bare host. Rows that fail this step are left out and counted. Second, the result is XML-escaped: an ampersand becomes &, a less-than sign <, a greater-than sign >, a double quote ", and an apostrophe '. A query string such as ?id=7&page=2 therefore appears as ?id=7&page=2 in the file, which is correct and is what an XML parser reads back as the original address.

The optional tags carry different weight. Lastmod is a W3C datetime, written here as a YYYY-MM-DD date; a CSV value that includes a time keeps only its date part. Changefreq is one of always, hourly, daily, weekly, monthly, yearly, or never, and priority runs from 0.0 to 1.0 with 0.5 as the default, written to one decimal place and meaningful only relative to other pages on the same site. sitemaps.org calls both hints. Google reads lastmod when it is consistently accurate and ignores changefreq and priority, so an honest lastmod matters more than either. Settings holds the defaults applied to new rows and switches that leave each optional tag out of the file.

CSV import reads four columns in the order url, lastmod, changefreq, priority. A first row is treated as a header only when its first cell is url or loc, quoted fields may contain commas, and an unknown frequency or out-of-range priority falls back to the defaults. Export CSV writes the same four columns, so a list can be edited in a spreadsheet and imported again.

Two rows: https://example.com/ with lastmod 2026-10-01, changefreq daily, and priority 1.0, and https://example.com/blog?id=7&page=2 with no date, changefreq weekly, and priority 0.5. The URL count reads 2. The first entry becomes <loc>https://example.com/</loc> followed by <lastmod>2026-10-01</lastmod>, <changefreq>daily</changefreq>, and <priority>1.0</priority>. The second becomes <loc>https://example.com/blog?id=7&amp;page=2</loc> with no lastmod element, because an empty date is omitted rather than written blank.

XML sitemaps give crawlers a direct list of the pages a site considers worth indexing, and keeping that list by hand becomes impractical as a site grows. The scenarios below are common reasons to build or rebuild one.

  • Small business websites: A local business with 20 to 50 pages can list every page with an accurate last-modified date and deploy a sitemap without installing a CMS plugin. Since Google ignores priority, the date is the field worth keeping current.
  • Portfolio and personal sites: Freelancers maintaining a portfolio site can list project pages, blog posts, and contact pages. Changefreq values such as weekly for the blog and monthly for static pages are hints that some crawlers may read; the lastmod date carries the real signal.
  • Site migration planning: During a domain migration, export the current URL list as CSV, update the domain in a spreadsheet, import it again, and generate a sitemap for the new domain without rebuilding entries one by one. The new sitemap must be served from the new host.
  • Staging and QA review: A sitemap built from the intended page list doubles as a checklist for confirming every page responds before launch. Lastmod should reflect when each page's content actually changed, not the deployment date, or search engines learn to distrust it.
  • E-commerce product pages: Online stores with seasonal inventory can import product URLs by CSV and regenerate the sitemap whenever the catalog changes. Catalogs above 50,000 products need several files and a sitemap index, which the URL count makes visible.
  • Content audit and SEO review: Export the current entries as CSV, review them in a spreadsheet alongside analytics data, remove pages that no longer deserve indexing, and regenerate a leaner sitemap focused on the pages that matter.
  • Multi-language sites: Sites serving several languages can keep one sitemap per language subdirectory, each listing only the URLs under its own path, with their own last-modified dates.
  • Event and campaign pages: Marketing teams launching time-sensitive campaigns can add landing page URLs and update lastmod as the pages change, then drop the URLs from the sitemap once the event ends and the pages are retired.
Inputs, outputs, and what the XML Sitemap Generator computes

What the XML Sitemap Generator asks for and what it returns, as a plain list. Defaults, units, and ranges are the ones the form loads with.

Inputs

  • Default Change Frequency · default: weekly
  • Default Priority (0.0 - 1.0) (numeric input) · default: 0.5 · range: 0 to 1
  • Include lastmod tags · default: on
  • Include changefreq tags · default: on
  • Include priority tags · default: on
  • Generated XML Sitemap

Controls

Generate · Reset · Copy to Clipboard · Download sitemap.xml · Export CSV

Example

Two rows: https://example.com/ with lastmod 2026-10-01, changefreq daily, and priority 1.0, and https://example.com/blog?id=7&page=2 with no date, changefreq weekly, and priority 0.5.