toolbench.onlineby Valkyron Labs

Developer

XML Sitemap Generator

Turn a list of absolute URLs into sitemap XML with optional lastmod, changefreq, and priority. Copy or download the urlset. Nothing is uploaded.

XML Sitemap Generator

Turn absolute URL rows into a sitemap urlset.

Add one URL per line. Use |lastmod|changefreq|priority when you need extra fields.

Sitemap XML

—

Output actions

Ready to copy output once your result appears.

URL rows and sitemap fields

XML Sitemap Generator builds one urlset document from lines you paste. Each line starts with an absolute URL. Optional lastmod, changefreq, and priority sit after pipe characters. The result is XML with the sitemaps.org 0.9 namespace. The page does not fetch your site, split a 50,000-URL file, or write a sitemap index.

How to build sitemap XML

  1. 1Leave the sample rows or replace them. Put one absolute URL on each line. Add |lastmod|changefreq|priority only on rows that need those tags.
  2. 2Click Generate sitemap XML. A line that is not an absolute URL stops the run and the result is cleared.
  3. 3Use Copy output for the XML. Download output saves a text file named xml-sitemap-generator.txt, which you can rename to sitemap.xml on the server.

What it is good for

  • • Turning a short hand-maintained URL list into a urlset you can deploy.
  • • Attaching a lastmod date, a changefreq word, and a priority number to selected rows.
  • • Checking how an ampersand in a query string is escaped inside loc.

Example

Input

https://toolbench.online/
https://toolbench.online/tools/slug-generator|2026-04-10|weekly|0.8

Output

<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
  <url>
    <loc>https://toolbench.online/</loc>
  </url>
  <url>
    <loc>https://toolbench.online/tools/slug-generator</loc>
    <lastmod>2026-04-10</lastmod>
    <changefreq>weekly</changefreq>
    <priority>0.8</priority>
  </url>
</urlset>

The first row has no pipes, so its url element contains only loc. The second row fills lastmod, changefreq, and priority in that order.

What each pipe field becomes

Blank lines are dropped. Each remaining line is split on | into at most four trimmed pieces: loc, lastmod, changefreq, and priority. A fifth piece is ignored. loc is passed to the URL parser and then written back with toString, so a host with no path becomes a URL that ends in a slash. https://toolbench.online is stored as https://toolbench.online/. A path is kept. A space in the path is percent-encoded by that parser before it ever reaches the XML.

lastmod, changefreq, and priority are omitted when the piece is empty. They are not checked against the sitemap protocol lists. weekly is copied through, and so is the word sometimes, and so is a priority of 2 or of high. The tags appear in a fixed order when present: loc, then lastmod, then changefreq, then priority. The document always starts with the XML declaration for version 1.0 and UTF-8, then a urlset whose xmlns is http://www.sitemaps.org/schemas/sitemap/0.9.

Options you actually have

There is one field, URL rows, and one action, Generate sitemap XML. There is no toggle for image, video, or news namespaces, no gzip option, and no choice of line ending. Indentation in the result is two spaces for url and four spaces for the child tags. That shape is fixed.

Copy output and Download output both use the latest successful XML. The download filename is xml-sitemap-generator.txt because the shared download control uses a .txt suffix for this slug. Rename it when the host expects sitemap.xml. The status line above the result says Sitemap XML generated. after a success, Enter at least one URL. when every line is blank, and Each line must start with a valid absolute URL. when any row fails to parse.

Jobs a hand-built urlset covers

A small site, a campaign folder, or a set of URLs you already listed in a sheet can be pasted here and turned into XML without a crawler. Put the file where the host serves it, then point at it from robots.txt. The robots.txt generator writes that pointer as a separate file. It does not read this XML.

If the XML is hard to scan, paste it into the XML formatter. Titles and descriptions for the URLs themselves belong on the meta tag generator. A move from an old path to a new one is a redirect rule, not a sitemap row: build that on the redirect and rewrite rule generator, and list the destination here only if it should be crawled.

URLs the parser accepts

loc must be absolute. /tools/slug-generator and example.com/tools both fail the whole run, and the previous XML is cleared. http and https both parse. A fragment is kept, because the URL string includes the hash; this generator does not strip it. Search engines are expected to ignore fragments, but you should delete the hash yourself if you do not want it in loc.

Characters that are special in XML are escaped in every tag: & becomes &amp;, < becomes &lt;, > becomes &gt;, and quotes become &quot; and &apos;. A query string a?q=1&x=2 therefore shows the ampersand as &amp; inside loc. That is required so the document stays well-formed. Do not pre-escape the line as &amp; or the loc will contain a double escape.

The page does not enforce the 50,000-URL or 50-megabyte sitemap limits, and it does not emit a sitemapindex that points at several files. If the list is that large, split it yourself and generate each part. It also does not call your website, so a URL that 404s is still written.

Rules and limitations

One absolute URL per line. Optional fields are lastmod, changefreq, and priority, separated by | in that order. Empty optional fields are left out. Extra pipes beyond the fourth field are dropped.

Every row must parse or the run fails with an empty result. changefreq and priority are copied as text. The xmlns is only the 0.9 sitemap namespace. Download output writes xml-sitemap-generator.txt.

Common problems

A relative path, a bare host, or a line of notes in front of the URL produces Each line must start with a valid absolute URL. Remove that line or give it a scheme. One bad row rejects the batch.

A host without a trailing slash gains one during normalization. A hash in the input stays in loc. A priority or changefreq outside the protocol vocabulary is still emitted, so check those words before you upload the file.

Frequently asked questions

Which fields can one line include?

The URL, then an optional lastmod, changefreq, and priority, separated by pipes. https://toolbench.online/tools/slug-generator|2026-04-10|weekly|0.8 writes all four tags. A line with only the URL writes loc alone.

Does it check changefreq and priority?

No. Whatever text you put in those positions is escaped and placed in the tags. weekly and 0.8 are conventions you supply. The generator does not reject sometimes or a priority above 1.

Will a relative URL work?

No. Each line must be an absolute URL with a scheme. A path such as /tools/slug-generator fails the run and clears the XML.

Does it build a sitemap index?

No. The output is a single urlset. It does not split at 50,000 URLs and it does not write sitemapindex XML. Split a long list yourself and generate each part.

Is my input uploaded or saved?

This tool processes input in your browser and does not save its input or output to local storage. Copy and download are user actions. The site uses analytics for page and action metadata and may use ads and production error reporting; see the Privacy Policy for those services.

About this tool

Maintained by Toolbench. For large or deeply nested files, split the input into smaller batches and verify representative results before using them in an import or application. Report reproducible problems through Contact.

Next steps

Related tools

Continue the workflow with nearby tools for formatting, publishing, debugging, or follow-up checks.

Trust

Policies, contact, and answers

Clear pages for how Toolbench works, what we collect, and how to reach us.