DevTools Logo

Sitemap.xml Generator

Sitemap.xml Generator

Turn a list of URLs into a valid XML sitemap for search engines — generated in your browser

URLs & Metadata

One absolute URL per line (3 URLs)

Examples

Generate two weekly sitemap entries

Input
URLs:
https://example.com/
https://example.com/about

Last modified: 2026-07-23
Change frequency: weekly
Priority: 0.8
Output
<?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-07-23</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
  <url>
    <loc>https://example.com/about</loc>
    <lastmod>2026-07-23</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
</urlset>

Both URL records receive the same selected date, frequency and priority.

Escape a query-string ampersand

Input
https://example.com/search?q=one&sort=asc

Change frequency: none
Priority: empty
Last modified: empty
Output
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://example.com/search?q=one&amp;sort=asc</loc>
  </url>
</urlset>

The ampersand is emitted as &amp; in source XML, and all blank optional elements are omitted.

About this tool

The Sitemap.xml Generator turns a newline-separated URL list into an XML urlset document. Each nonblank line becomes one url entry, and a shared last-modified date, change frequency and priority can be added to every entry before copying the result.

URLs are trimmed and XML-sensitive ampersands, angle brackets, quotation marks and apostrophes are escaped. Optional elements are omitted when their controls are blank, while the XML declaration and sitemap namespace are always included—even for an empty URL list.

The browser controls guide priority toward 0 through 1 and provide the supported change-frequency values, but the generator does not validate absolute URLs, deduplicate entries or enforce sitemap size limits. Validate and split large production sitemaps as needed.

How to use

  1. Enter the URLs

    Paste one absolute URL per line. Blank lines are ignored and surrounding whitespace is removed.

  2. Choose shared metadata

    Select a change frequency, set a priority, and choose a last-modified date to apply the same values to every URL.

  3. Review the XML

    Check the generated loc values and confirm XML-sensitive query-string characters such as ampersands are escaped.

  4. Copy and publish

    Copy the XML, save it as sitemap.xml, publish it at an accessible URL, and submit or advertise that location to search engines.

Use cases

Publishing a small static-site sitemap

Turn a known route list into a complete sitemap without writing XML by hand.

Submitting a new site to search engines

Create the initial sitemap artifact for discovery after a launch or domain migration.

Regenerating shared metadata

Apply one updated last-modified date or crawl hint across a batch of related URLs.

Checking XML escaping

Confirm that URLs containing query parameters are safe inside loc elements before deployment.

Common mistakes

Mistake:Entering relative paths or arbitrary text as loc values.

Fix:Use fully qualified absolute URLs; the component does not validate them.

Mistake:Assuming priority directly improves rankings.

Fix:Treat priority and changefreq as crawl hints, not guarantees, and focus on accurate URLs and modification dates.

Mistake:Using one shared lastmod date when pages changed at different times.

Fix:Generate separate groups or edit the XML when accurate per-page dates are required.

Mistake:Feeding an unlimited URL list into one file.

Fix:Enforce applicable sitemap limits outside the tool and use a sitemap index when the site must be split across files.

Frequently asked questions

References & standards