induwara.lk
induwara.lkDeveloper · Utility

XML Sitemap Generator

Paste your page URLs and get a valid sitemap.xml in seconds — with optional lastmod, changefreq and priority. It follows the sitemaps.org protocol, runs entirely in your browser, and needs no signup. Copy it or download it, ready for Google Search Console.

By Induwara AshinsanaUpdated Jul 3, 2026
Generate sitemap.xmlsitemaps.org 0.9
Runs in your browser

Absolute http(s):// URLs only. Duplicates and invalid lines are flagged and skipped automatically.

Uses 2026-07-08 for every URL.

A hint only — Google ignores this field.

Range 0.0–1.0. Google ignores it too.

Pretty is indented and readable; minified is smaller.

Paste your page URLs to build a sitemap

Add one absolute URL per line, choose your options, and a valid sitemap.xml appears here — ready to copy or download.

Sources cited: sitemaps.org protocol v0.9 & Google Search Central. Nothing you paste leaves your device — the file is built locally.

How it works

A sitemap is a plain XML file that lists the pages you want search engines to know about. This generator serialises your URL list exactly as the sitemaps.org XML Sitemap protocol v0.9 specifies — no crawling, no estimation, no data leaving your device. The build runs in five deterministic steps:

  1. Parse & clean. Your input is split on new lines and trimmed. Blank lines are dropped; each remaining line must be an absolute http:// or https:// URL of at most 2,048 characters (the protocol's <loc> limit). Exact duplicates are removed and reported so no page appears twice.
  2. Escape XML entities. Each URL is passed through the five entity escapes the protocol mandates — & &amp;, plus the escapes for ', ", > and <. The ampersand is escaped first so nothing is double-escaped.
  3. Assemble each entry. Every URL becomes a <url> block with a required <loc>. When enabled, a <lastmod> is added in W3C Datetime YYYY-MM-DD form, an optional <changefreq> from the enum (always/hourly/daily/weekly/monthly/yearly/never), and a <priority> clamped to the 0.0–1.0 range and formatted to one decimal.
  4. Wrap the document. The entries are enclosed in a <urlset> element carrying the sitemaps.org 0.9 namespace, prefixed with the <?xml?> declaration.
  5. Enforce the limits. The file is capped at 50,000 URLs and 50 MB uncompressed. If your list is bigger, it is chunked into sitemap-1.xml, sitemap-2.xml, … and a sitemap_index.xml is generated that references each child file — the exact split-and-index remedy both sitemaps.org and Google document.

One note on the optional fields: Google Search Central states that Google ignores <priority> and <changefreq>, and uses <lastmod>only when it is consistently accurate. They are still valid protocol elements — other crawlers may use them — so the tool lets you include or omit each one. Given the same URL list and options, the output is byte-for-byte identical every time (aside from a "today" date), which is what makes it safe to commit to a repository or diff between builds.

Worked examples

Small blog — 3 URLs, entity escaping

  1. Input line 3 is https://example.lk/about?ref=nav&x=1
  2. Parse: 3 absolute URLs, 0 duplicates, 0 rejected
  3. Escape: the & in URL 3 becomes &amp; → …/about?ref=nav&amp;x=1
  4. Assemble: 3 <url> blocks, each with <loc>, <lastmod>2026-07-03, <changefreq>weekly, <priority>0.8
  5. Wrap in <urlset> → one sitemap.xml, no split (3 ≤ 50,000)

Oversize store — 120,000 URLs, split + index

  1. Input: 120,000 valid URLs on https://shop.example.lk
  2. 120,000 > 50,000 → ceil(120,000 ÷ 50,000) = 3 files
  3. sitemap-1.xml = 50,000, sitemap-2.xml = 50,000, sitemap-3.xml = 20,000
  4. 50,000 + 50,000 + 20,000 = 120,000 (checks out)
  5. Emit sitemap_index.xml listing exactly 3 child <sitemap> entries

Edge values — clamping & validation

  1. Priority typed as 1.7 → clamped to 1.0; -0.4 → clamped to 0.0
  2. Priority 0.55 → formatted to one decimal → 0.6
  3. Line ftp://x.lk → rejected (scheme not http/https)
  4. Line /relative/path → rejected (not an absolute URL)
  5. https://a.lk/x pasted twice → second removed as a duplicate

Frequently asked questions

Sources & references

The schema, limits, and formatting rules used here were last cross-checked against these sources on 2026-07-03. Need to tell crawlers where the file lives? Add a Sitemap: line with the robots.txt generator.

Related tools

Rate this tool
Be the first to rate

Comments & feedback

Spotted a bug or want an improvement? Tell us — our team reviews every comment, and good ideas get built. Comments are public and anonymous.

Found a bug, edge case, or want to suggest an improvement?

Email me at [email protected] — most fixes ship within 24 hours.