FormatterHQ

XML Sitemap Generator

Paste your page URLs — one per line, absolute or relative — and get a valid sitemaps.org XML sitemap ready to upload and submit to Google Search Console.

Input TEXT
Output XML
Ready.

How to use the XML Sitemap Generator

  1. Paste URLs into the input editor, one per line. Relative paths such as /about are combined with the Base URL.
  2. Optionally add a date, change frequency or priority after a URL on the same line, e.g. /blog/ 2026-09-01 weekly 0.8.
  3. Choose defaults for lastmod, changefreq and priority, or omit them.
  4. Click Generate sitemap, then copy or download sitemap.xml.

Build a sitemap.xml with the XML sitemap generator

An XML sitemap lists the URLs you want search engines to discover. It is especially useful for new sites with few backlinks, large sites, and pages that are hard to reach through internal links. Many CMSs create sitemaps automatically, but static sites, landing-page builders and custom apps often do not. This XML sitemap generator turns a plain list of URLs into a standards-compliant file.

Example

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://www.example.com/blog/</loc>
    <lastmod>2026-09-01</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
</urlset>

What the generator takes care of

  • Relative paths are resolved against the base URL, so you can paste paths copied from your router or file system.
  • Duplicates are removed after normalisation.
  • Escaping: characters such as & in query strings are XML-escaped, a common reason hand-made sitemaps fail to parse.
  • Per-URL values: a date (YYYY-MM-DD), a change frequency word or a priority between 0 and 1 after the URL overrides the defaults.
  • Limits: a sitemap may contain at most 50,000 URLs (and 50 MB uncompressed). Larger sites need several sitemaps and a sitemap index.

Do lastmod, changefreq and priority matter?

Google has stated that it ignores changefreq and priority. It does use lastmod when the value is consistently accurate, so only include dates that reflect real content changes — setting every page to today's date on every build teaches search engines to ignore the field. Bing also treats accurate lastmod values as a useful signal.

Which URLs belong in a sitemap?

Include canonical, indexable pages that return HTTP 200. Leave out redirects, error pages, URLs with tracking parameters, pages blocked in robots.txt and pages marked noindex. Use the same protocol and host (with or without www) that your canonical tags use.

Submitting the sitemap

Upload the file to your site root, reference it in robots.txt with a Sitemap: line — the robots.txt generator adds it for you — and submit it in Google Search Console and Bing Webmaster Tools. For multilingual sites, add alternate language links with the hreflang generator, and check the finished file with the XML validator if you edit it by hand.

Keeping sitemaps up to date

Search engines re-read sitemaps regularly, so an accurate file keeps paying off long after you submit it. If you move to a new domain, submit the old and new sitemaps together for a while so crawlers find the redirects quickly.

A sitemap is only useful when it reflects the current site. Regenerate it whenever you publish, move or delete pages, and keep the file free of URLs that redirect or return errors — Search Console reports these as issues. For sites that change daily, generating the sitemap automatically from your database or build step is best; this tool is ideal for small static sites, landing pages, documentation and one-off migrations where you already have a list of URLs, for example exported from a crawler or spreadsheet.

Privacy

The tool runs entirely in your browser. Nothing you type or paste is sent to our servers.

Frequently asked questions

How many URLs can a sitemap contain?
Up to 50,000 URLs and 50 MB uncompressed per file. For more, split the URLs into several sitemaps and list them in a sitemap index file.
Does Google use priority and changefreq?
No. Google ignores both. It uses lastmod when the dates are accurate, so include lastmod only if you can keep it truthful.
Where should I upload sitemap.xml?
Usually at the root of your domain (https://example.com/sitemap.xml). A sitemap can only contain URLs from the same host and below its own folder, unless it is submitted through Search Console.
Why does my sitemap show an XML error?
Unescaped ampersands in URLs are the most common cause. This generator escapes them automatically.
Can I include relative URLs?
Sitemaps require absolute URLs. Enter relative paths together with a base URL and the generator turns them into absolute ones.

Last updated October 3, 2026

Related tools

Random XML Generator Generate realistic fake XML test data — names, emails, addresses, dates and more — with custom fields. HTML Table to XML Converter Convert HTML to XML online for free. Attributes, arrays and root element are configurable. XML to HTML Table Converter Convert XML to HTML online for free. Get clean table markup with a live preview. Barcode Generator Generate Code 128, EAN-13, UPC-A, Code 39, ITF-14, ISBN, Data Matrix, PDF417 and more barcodes. Download PNG or SVG for free. Basic Auth Header Generator Build an HTTP "Authorization: Basic" header from username:password, or decode an existing Basic auth header back to credentials. Bcrypt Hash Generator Generate a bcrypt password hash ($2y$) with a configurable cost factor, compatible with PHP password_hash and Laravel. Hreflang Tag Generator Generate hreflang annotations for multilingual sites as <link> tags, sitemap entries or HTTP headers, with code validation. .htaccess Redirect Generator Generate Apache .htaccess 301/302 redirects from old → new URL pairs, plus force-HTTPS, www and trailing-slash rules. Meta Tag Generator Generate SEO meta tags for your page head: title, description, keywords, robots, canonical, Open Graph and Twitter cards. Open Graph & Twitter Card Preview Paste your page’s meta tags and preview the link on Facebook, X/Twitter, LinkedIn, Slack and Discord, with fixes for missing tags. Robots.txt Generator Create a robots.txt file: allow or block paths, block AI crawlers and specific bots, set crawl-delay and add your sitemap URL. SERP Snippet Preview & Meta Length Checker Check title tag and meta description length in pixels and characters and preview your Google search result on desktop and mobile.