Free XML Sitemap Generator - Create Sitemaps Online Instantly

Generate a valid XML sitemap from your URLs instantly - free, no sign-up, runs in your browser. Paste URLs, copy the XML, submit to Google Search Console.

sitemap.xml
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <!-- paste your URLs on the left -->
</urlset>

Paste your URLs, get a ready-to-submit XML sitemap in seconds

Drop a list of URLs into the tool above, tweak the settings, and it spits out a valid XML sitemap you can submit straight to Google Search Console. No account, no install, no waiting.

How to use the XML sitemap generator

  1. Paste your URLs - one per line - into the input box above.
  2. Set a Last Modified date (today's date is a safe default).
  3. Choose a Change Frequency that matches how often your pages update - weekly works for most sites.
  4. Set a Priority between 0.1 (low) and 1.0 (high). Your homepage usually gets 1.0, inner pages 0.8 or lower.
  5. Click Generate and copy the XML output.
  6. Save it as sitemap.xml and upload it to your site's root folder (e.g., https://example.com/sitemap.xml).
  7. Submit the URL in Google Search Console under Sitemaps.

Your URLs never leave your browser. The generator runs entirely client-side, so nothing is uploaded to any server. Your site structure stays private.

Worked example - input and output

Say you have a small blog with three pages. You paste these URLs:

https://example.com/
https://example.com/blog/
https://example.com/blog/hello-world/

The generator produces this ready-to-use sitemap.xml:

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

Copy that XML, save it as sitemap.xml at the root of your server, then paste https://example.com/sitemap.xml into Google Search Console's Sitemaps panel. Google will start crawling those pages much faster.

How to generate a sitemap programmatically

If you need to build a sitemap inside your own code - for example, at deploy time - here are two minimal, runnable snippets.

Python

from xml.etree.ElementTree import Element, SubElement, tostring
from xml.dom.minidom import parseString

urls = [
    'https://example.com/',
    'https://example.com/blog/',
]

root = Element('urlset', xmlns='http://www.sitemaps.org/schemas/sitemap/0.9')
for u in urls:
    url_el = SubElement(root, 'url')
    SubElement(url_el, 'loc').text = u
    SubElement(url_el, 'lastmod').text = '2025-01-15'
    SubElement(url_el, 'changefreq').text = 'weekly'
    SubElement(url_el, 'priority').text = '0.8'

xml_str = parseString(tostring(root)).toprettyxml(indent='  ')
with open('sitemap.xml', 'w') as f:
    f.write(xml_str)
print('sitemap.xml written')

JavaScript (Node.js)

const fs = require('fs');

const urls = [
  'https://example.com/',
  'https://example.com/blog/',
];

const entries = urls.map(u => `
  <url>
    <loc>${u}</loc>
    <lastmod>2025-01-15</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>`).join('');

const xml = `<?xml version='1.0' encoding='UTF-8'?>
<urlset xmlns='http://www.sitemaps.org/schemas/sitemap/0.9'>${entries}
</urlset>`;

fs.writeFileSync('sitemap.xml', xml);
console.log('sitemap.xml written');

How the generator works

The tool takes each URL you paste and wraps it in the standard <url> block defined by the Sitemaps Protocol (sitemaps.org). That protocol is jointly maintained by Google, Bing, and Yahoo and is the format search engines expect.

Each entry holds four fields:

FieldWhat it tells search enginesExample
<loc>The canonical URL of the pagehttps://example.com/about/
<lastmod>When the page was last changed (ISO 8601 date)2025-01-15
<changefreq>How often content changes (a hint, not a command)weekly
<priority>Relative importance vs other pages on the same site0.8

All of this stays in your browser - nothing is sent to techtoolexpert.com or any third-party server.

When to use an XML sitemap - and when to skip it

Good reasons to create one

  • Your site is new or recently launched and you want Google to find your pages faster.
  • You have pages with few inbound links that crawlers might miss.
  • You run a large site (hundreds of pages or more) and want crawl budget spent efficiently.
  • You've just done a URL migration or restructure and need Google to discover the new paths.

When a sitemap won't help much

  • Small, well-linked sites (under 20-30 pages) that Google can already crawl from the homepage.
  • Pages you intentionally block with robots.txt or noindex - listing them in the sitemap conflicts with those signals.
  • URLs that aren't publicly accessible (staging environments, password-protected pages).

Google itself notes in its Search Central sitemap documentation that sitemaps are most valuable for large sites, sites with rich media, or brand-new domains with little external linking.

Sitemap quick-reference snippet

Here is the minimal valid structure - paste URLs and copy the XML, then submit it in Google Search Console:

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

One <urlset> element wraps everything. Each page lives in its own <url> block. Save the file as sitemap.xml, upload it to your domain root, and paste the full URL into the Sitemaps section of Google Search Console to request indexing.

Related tools you might find useful

If you work with structured data files alongside your sitemap workflow, these tools can help:

Ready to get your pages indexed faster? Paste your URLs into the generator above, hit Generate, and you'll have a valid sitemap file in under a minute.

Frequently asked questions

Is this XML sitemap generator free to use?+
Yes, completely free. There's no sign-up, no account, and no hidden limit on how many URLs you can process.
Are my URLs uploaded to your server?+
No. Everything runs in your browser. Your URL list and the generated sitemap never leave your device, so there's no risk of exposing your site structure.
How many URLs can I include in one sitemap?+
The Sitemaps Protocol allows up to 50,000 URLs per file, with a maximum uncompressed file size of 50 MB. If your site is larger, split it into multiple sitemaps and reference them from a sitemap index file.
What is a sitemap index file and do I need one?+
A sitemap index is an XML file that points to several individual sitemap files. You need one when your site has more than 50,000 URLs or when you want to separate sitemaps by content type (e.g., pages, images, videos). For most sites a single sitemap.xml is enough.
What's the difference between changefreq and priority - do search engines actually use them?+
Google has said publicly that it treats changefreq and priority as hints, not instructions - it may ignore them entirely. They're still worth including for completeness, but don't rely on them to control crawl frequency. Focus on accurate lastmod dates instead, as those carry more weight.
How do I submit my sitemap to Google?+
Log in to Google Search Console, select your property, go to Sitemaps in the left menu, paste the full URL (e.g., https://example.com/sitemap.xml), and click Submit. Google will start processing it within hours, though indexing individual pages can take days or weeks.
Should I include every page on my site in the sitemap?+
Only include pages you want indexed. Leave out login pages, admin dashboards, duplicate URLs, pages blocked by robots.txt, and anything marked noindex. Including them confuses crawlers and wastes crawl budget.
Can I generate a sitemap in Python or JavaScript without using an online tool?+
Yes - see the Python and Node.js code snippets on this page. Both use only standard library features and write a valid sitemap.xml file you can deploy directly. For larger projects, libraries like python-sitemap or next-sitemap automate this at build time.