XML Nerd
A cartoon tree frog in round glasses, thinking

XML Sitemap Generator

Turn a list of URLs into a sitemap.xml file.

    Runs in your browser. Nothing you type is uploaded.

    How the sitemap generator works

    Paste your URLs, one per line, and a valid sitemap.xml appears as you type. You can add a base URL so that lines that are only paths, such as /about/, become full addresses, and choose a last modified date, change frequency and priority to apply to every URL. Then copy the XML or download it as a file.

    This tool does not crawl your site

    It builds the sitemap from the list you give it and never visits your website. You can get a list of URLs from your CMS or hosting export, your analytics, or an existing page list. Most site builders and static site generators also have a sitemap plugin that makes one automatically.

    What the tool takes care of

    • Removes duplicates and fragments (#section), and writes special characters such as & as XML entities.
    • Keeps only URLs on the same scheme and host as the first one, because a sitemap may only list its own site.
    • Skips lines that are not full web addresses and tells you which line and why.
    • Splits lists of more than 50,000 URLs into several files with an index, which is the limit for one sitemap.

    Using your sitemap

    1. Save the file as sitemap.xml at the root of your site, so it is at https://example.com/sitemap.xml.
    2. Add the Sitemap: line shown under the output to your robots.txt.
    3. Submit the address in Google Search Console and Bing Webmaster Tools.

    FAQ

    Do change frequency and priority matter?

    Google has said it ignores both, and other search engines give them little weight, so they are optional. A last modified date is more useful, but only if it is accurate, so leave it out unless you know when each page changed.

    Does a sitemap get my pages into search results?

    It helps search engines find your pages, especially new or poorly linked ones, but it does not guarantee they are indexed or ranked. Good content and links still matter most.

    Can I check an existing sitemap?

    Paste it into the XML validator to check that it is well-formed.

    Is my list of URLs uploaded anywhere?

    No. The sitemap is built in your browser, so your URLs stay on your device.

    More XML tools

    • XML formatter: Format, minify and validate XML in one place.
    • XML validator: Check that XML is well-formed and find the exact line and column of an error.
    • XML beautifier: Pretty print XML with 2 spaces, 4 spaces or tabs.
    • XML minifier: Strip the whitespace between tags to make XML as small as possible.