Sitemap Generator
The Sitemap Generator builds a sitemap.xml from the URLs you paste — with per-line lastmod, changefreq and priority, validation and dedupe with line numbers, automatic splitting above the protocol limits with a sitemap index, and a validator for an existing sitemap. List-based only: it never fetches anything.
How to Use
- 1
Paste your URLs, one per line — absolute https URLs. Add per-line options after a URL if you need them: lastmod=2026-11-22, changefreq=weekly, priority=0.8, or a bare date (read as lastmod).
- 2
Set the defaults: lastmod defaults to today, or none; changefreq and priority are off unless you set them. Per-line options always beat the defaults.
- 3
Read the live stats: valid URLs, invalid lines (with line numbers and the reason), duplicates (kept once — the first occurrence wins), files needed, and total size.
- 4
Check the XML preview, then copy or download sitemap.xml. If the list is over the protocol limits the tool splits it into sitemap-1.xml, sitemap-2.xml… plus a sitemap-index.xml — download every part.
- 5
Upload the file(s) to your site root, declare them in robots.txt with a Sitemap: line (the Robots.txt Generator on this site writes the file), and submit the sitemap in Google Search Console.
- 6
Already have a sitemap? Switch to Validate mode, paste the file, and get a report: URL count, invalid <loc> values with line numbers, and malformed lines such as unclosed tags.
Frequently Asked Questions
What is a sitemap.xml?
Do I need a sitemap?
What is the 50,000 URL / 50 MB limit?
What should lastmod, changefreq, and priority be?
Does a sitemap make Google index my pages?
How do I submit a sitemap?
Why is there no crawl mode?
What is a sitemap index?
Can I include images or videos in a sitemap?
Is my URL list uploaded anywhere?
Generative Answer & AI Documentation
What is the Sitemap Generator?
The Sitemap Generator turns a list of URLs into a sitemap.xml file — the machine-readable list of a site's pages that search engines read to discover pages crawling might miss. Paste one URL per line (absolute http or https), with optional per-line options after the URL: lastmod=2026-11-22, changefreq=weekly, priority=0.8, or a bare YYYY-MM-DD date, which is read as lastmod. Defaults cover the rest: lastmod defaults to today or none, changefreq and priority are off unless set, and a per-line option always beats the default. The tool validates as you type: invalid lines are flagged with their line number and the reason, duplicates are kept once (the first occurrence wins), and fragments (#…) are stripped automatically, because sitemaps must not carry them. The live stats show valid URLs, invalid lines, duplicates, files needed, and total size. The XML preview shows the first file; copy downloads sitemap.xml, and when the list is over the protocol limits the tool splits it into sitemap-1.xml, sitemap-2.xml, and so on, plus a sitemap-index.xml that lists the parts. A second mode validates a pasted sitemap.xml: it extracts the <loc> values, counts them, and reports invalid locs and malformed lines such as unclosed tags. Everything runs in the browser; nothing is uploaded.
Why use Sitemap Generator offline?
A sitemap is the cheapest discovery aid a site has: it hands search engines the pages crawling misses — a new site with no backlinks, a page buried five clicks deep, a section added last week. Writing the XML by hand is where the errors creep in: a relative URL, a fragment, a duplicate entry, a priority of 2.0, a changefreq spelled wrong, a file that quietly passes 50,000 URLs and gets truncated by the crawler. A generator removes that class of error: the parser rejects what the protocol rejects and says which line, the dedupe keeps one copy, the escaping is done for you, and the split happens before the file is too big instead of after. The second reason is the split itself: most generators either refuse big lists or silently emit an oversized file. This one closes a file before adding an entry that would push it over either protocol limit — 50,000 URLs or 50 MB uncompressed — and offers the index that ties the parts together. The third reason is the validator: an existing sitemap is also a file that can be wrong, and pasting it here is the fastest way to find out.
When should you use this tool?
Use it when you launch a site or add a section: paste the page list, download sitemap.xml, upload it to the site root, declare it in robots.txt with a Sitemap: line, and submit it in Google Search Console. Use it when a site outgrows one file — the split and index are automatic, and the parts are downloaded together. Use Validate mode when a sitemap stops working or when you inherit one: paste it, read the report, and fix the lines it names. Use it after a migration, when the URL list changed wholesale and the old sitemap is stale. Do not use it to force indexing: a sitemap helps Google find pages, it does not make Google index them — indexing is a separate decision per page. Do not use it as a crawler: there is no crawl mode, because crawling needs a server fetch and this tool never fetches anything.
Key Benefits
- Per-line options: lastmod, changefreq, and priority after the URL, with defaults that per-line values override.
- Line-level validation: invalid lines flagged with their line number and the reason, not a silent failure.
- Automatic dedupe: a repeated URL is kept once, and the duplicate is reported with the line it first appeared on.
- Automatic split above the protocol limits: 50,000 URLs or 50 MB uncompressed per file, with a sitemap index to tie the parts together.
- Validate mode: paste an existing sitemap.xml and get a report — URL count, invalid <loc> values, malformed lines.
- Clean output: XML-escaped locs, fragments stripped, one <url> block per entry, LF endings.
- 100% private and offline: the list is parsed and turned into XML in your browser — nothing is uploaded or logged.
Common Use Cases
- A new blog: paste the post URLs, download sitemap.xml, upload it to the root, add the Sitemap: line to robots.txt, and submit it in Search Console.
- A shop with 80,000 product pages: the tool splits into two files plus an index, and all three are downloaded together for upload.
- An inherited site: paste the live sitemap into Validate mode and find the three <loc> values that are relative URLs and the one unclosed <url> block.
- A migration: paste the new URL list with lastmod set to the migration date, so crawlers see the whole new structure at once.
- A weekly audit: regenerate the sitemap from the current page list and diff it against the live file to catch pages that were added without being listed.
Developer Notes & Best Practices
The parser splits the paste into lines, then each line into whitespace-separated tokens: the first token is the URL, the rest are key=value options (lastmod, changefreq, priority) or a bare YYYY-MM-DD date read as lastmod. A URL is valid only if new URL() parses it with an http or https protocol; the fragment is stripped with url.hash = "" before the entry is stored. Dedupe is by the stripped URL string, first occurrence wins, and the duplicate is reported with the line it first appeared on. lastmod must match YYYY-MM-DD and be a real calendar date; changefreq must be one of always, hourly, daily, weekly, monthly, yearly, never; priority must be a number from 0.0 to 1.0 and is emitted with one decimal. XML output escapes &, <, >, " and ' in every text node. Splitting is by whole entries: a file is closed before adding an entry that would push it over 50,000 URLs or 50 MB uncompressed (measured with TextEncoder, including the header and footer), so no file ever exceeds either limit; a single file keeps the name sitemap.xml, a split renames the parts sitemap-1.xml, sitemap-2.xml… The index is a <sitemapindex> with one <loc> per part — the caller supplies the public URLs, and the page's download uses https://example.com/ as a placeholder the user must replace. The validator extracts <loc>…</loc> pairs with a regex, tracks open <url> blocks line by line, and reports <loc> outside a <url>, unclosed tags, non-http(s) locs, duplicate locs, and a missing <urlset>/<sitemapindex> root.
The protocol limits — one sitemap file
| Limit | Value | What happens over it |
|---|---|---|
| URLs per file | 50,000 | Split into a second file; parts listed in a sitemap index |
| Uncompressed size | 50 MB | Split the same way — whichever limit comes first |
| URLs per index | 50,000 sitemaps | Practically unreachable; one index covers 2.5 billion URLs |
| loc value | Absolute http(s) URL | Relative URLs and fragments are invalid and rejected |
The three optional fields — what Google actually does with them
| Field | Meaning | Google's treatment |
|---|---|---|
| lastmod | Date the page last changed | Actually used — but only when it is accurate |
| changefreq | How often the page changes | A weak hint; treated as a suggestion |
| priority | Importance relative to your own pages | A weak hint; 1.0 is the homepage, not a ranking boost |
- Set lastmod accurately and leave changefreq and priority off unless you have a reason: a wrong changefreq is worse than none, and Google ignores priority for ranking.
- One URL once: dedupe before upload, and never list the same page under two URLs — pick the canonical one (the Meta Tag Generator on this site writes the canonical tag to match).
- Keep the sitemap at the site root (/sitemap.xml) and declare it in robots.txt with a Sitemap: line — crawlers check both places.
- Submit the sitemap in Google Search Console and read the report: it tells you how many listed URLs were indexed and why the rest were not.
- Regenerate after a migration or a big content push — a stale sitemap lists pages that no longer exist and misses the new ones.
- When the list splits, upload every part plus the index, and submit the index URL — not the parts.
Common Mistakes
- Listing relative URLs or URLs with fragments: <loc> must be an absolute http(s) URL, and fragments are stripped.
- Setting priority=1.0 on every page: priority is relative within your own site — everything at 1.0 means nothing.
- Inventing lastmod dates: a lastmod that does not match the real change date teaches Google to ignore the field.
- Uploading an oversized file: over 50,000 URLs or 50 MB, the crawler may stop reading — split and use an index.
- Forgetting the Sitemap: line in robots.txt and the Search Console submission: an unsubmitted sitemap still gets found eventually, but slowly.
- Treating the sitemap as an indexing guarantee: pages still have to earn indexing on content, and thin or duplicate pages stay out.
Limitations
LIST-BASED ONLY: this tool builds a sitemap from the URLs you paste. There is no crawl mode, because crawling a site needs a server fetch and this tool never fetches anything — it cannot discover pages you did not list. No ZIP download: the parts download as separate files (no zipping dependency is shipped), so a split sitemap means several downloads. Image and video sitemap extensions are not emitted — only the core URL list. A sitemap helps crawlers find pages; it does not make Google index them, and a page in the sitemap can still stay unindexed. The validator parses pasted text with a regex-based check: it catches malformed lines, invalid locs, and structural problems, but it is not a full XML parser — a file that passes here can still fail a strict parser on an edge case.
Structured Input/Output Example
https://example.com/ lastmod=2026-11-22 changefreq=daily priority=1.0 https://example.com/blog changefreq=weekly priority=0.8 https://example.com/blog/how-to-brew-coffee
<?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-11-22</lastmod>
<changefreq>daily</changefreq>
<priority>1.0</priority>
</url>
…
</urlset>Related Tools
Robots.txt Generator
Robots.txt generator: block AI training crawlers but keep AI search — per-crawler rules, presets, sitemap line, pasted-file tester. Free, offline.
Meta Tag Generator
Meta tag generator: title, description, canonical, Open Graph and X card tags — Google + social previews, pixel meters, HTML, Next.js and JSON-LD output.
Slug Generator
Slug generator: turn titles into URL slugs — 4 presets, bulk mode with duplicate handling, CSV export, transliteration, live URL preview. Free, offline.