AddyAddyToolsAI-powered marketing workflows
  1. Home
  2. /
  3. Tools
  4. /
  5. Hreflang Sitemap Generator

Hreflang Sitemap Generator

Generate valid XML sitemaps with hreflang tags for multilingual sites, or organised standard sitemaps for single-language sites. Paste URLs or import from a sitemap, review the structure, and download ready-to-submit XML.

URL parsing, validation, and XML generation run in your browser. Optional AI features help match translated slugs and resolve ambiguous locale codes — these are clearly marked and only used when needed.

Paste URLs or fetch from a sitemap

Accepts a sitemap index or a single sitemap. Large sites often list multiple sitemaps in robots.txt— fetch each one separately to combine them.

How it works

  1. 1

    Add your URLs

    Paste URLs one per line, or import them from an existing sitemap URL. The tool auto-detects whether your site is multilingual (subfolder, subdomain, or ccTLD patterns) or single-language, and adjusts accordingly.

  2. 2

    Review and adjust

    For multilingual sites, locales and page groups are detected automatically. AI helps match translated slugs and resolve ambiguous codes. For single-language sites, pages are listed by content section. You review and accept before generation.

  3. 3

    Choose format and download

    Pick an output format: single file, per-locale, or per-category. The validator checks for hreflang errors before generating. Download as XML or a ZIP with a sitemap index for multi-file output.

When you need hreflang tags

Google uses hreflang annotations to serve the right language or regional version of a page to each user. Without them, search engines may index the wrong version, show duplicate content warnings, or split ranking signals across locales. You need hreflang tags when your site has:

  • ✓Fully translated pages — the same content in multiple languages (e.g., English, French, German versions of every page)
  • ✓Regional variants — pages tailored for specific countries that share a language (e.g., en-gb and en-us with different pricing, spelling, or legal content)
  • ✓Partially translated sites — some pages translated, others only in the primary language. Hreflang with x-default prevents users from landing on untranslated pages
  • ✓Country-specific domains — separate ccTLDs (example.de, example.fr) or subdomains (de.example.com) that Google might treat as unrelated sites without hreflang linking them

Features

Multilingual and single-language support

Detects all three multilingual URL patterns: subfolder (/en-gb/), subdomain (en.example.com), and ccTLD (example.de). When no locale patterns are found, the tool switches to standard sitemap mode automatically.

Flexible output formats

Choose how to organise your sitemaps: a single file, one file per locale (e.g., sitemap-en.xml, sitemap-fr.xml), or one file per content category (e.g., sitemap-products.xml, sitemap-blog.xml). Multi-file output includes a sitemap index and downloads as a ZIP.

Bidirectional link validation

Google requires hreflang annotations to be confirmed from every page in the group. The validator checks that every page cluster has reciprocal links and flags orphan pages with only one locale variant.

Language and region codesAI-assisted for ambiguous codes

Hreflang values use ISO 639-1 language codes and optional ISO 3166-1 Alpha-2 region codes. For ambiguous segments (e.g., /hk/ could be English or Chinese), AI suggests the most likely locale. Chinese locales are flagged when they may need zh-hans/zh-hant script subtags.

Translated slug matchingAI-assisted

When localised URLs use translated slugs (e.g., /shoes/running and /schuhe/laufen), the tool uses AI text embeddings to find semantically equivalent paths across locales. Results include confidence scores so you can review each match before accepting.

Sitemap protocol compliance

Generated sitemaps follow the sitemap protocol specification: 50,000 URLs and 50 MB per file, automatic splitting with a sitemap index, and <lastmod> dates preserved from source sitemaps.

x-default fallback

The x-default annotation tells Google which page to show when none of the specific language/region variants match the user. Select any URL as the x-default for every page cluster.

Sitemap import with category detection

Import from a sitemap index and the tool preserves which child sitemap each URL came from. This enables per-category output that mirrors your existing sitemap organisation — useful for large sites with separate product, blog, and page sitemaps.

Frequently asked questions

What is a hreflang sitemap?
A hreflang sitemap is an XML sitemap that tells search engines which language and regional versions of a page exist. Each URL entry includes xhtml:link elements pointing to all its translated equivalents, helping Google and other search engines serve the right version to users in each locale.
Can I use this for a single-language site?
Yes. If no locale patterns are detected in your URLs, the tool switches to standard sitemap mode and generates plain XML sitemaps without hreflang annotations. You can still use per-category output to organise URLs by content section.
Is this tool free?
Yes, completely free. No sign-up or account required. URL parsing, validation, and XML generation all run in your browser. The optional AI features (locale disambiguation and translated slug matching) use minimal server resources.
Is my data private? What does the AI process?
URL parsing, grouping, validation, and XML generation all run in your browser — your full URL list never leaves your device. AI is used in two optional cases: (1) when a locale code is ambiguous (e.g., /hk/ could be English or Chinese), the ambiguous segment and one example URL are sent to the server for disambiguation; (2) when translated slugs need matching, the path segments (not full URLs) are sent for similarity analysis. In both cases, only the minimum data needed is transmitted, and nothing is stored.
Can I import URLs from my existing sitemap?
Yes. Enter your sitemap URL (e.g., https://example.com/sitemap.xml) and the tool will fetch and extract all URLs. It handles both flat sitemaps and sitemap index files with multiple child sitemaps. When importing from a sitemap index, the tool preserves which child sitemap each URL came from, so you can split your output by category.
What URL structures are supported?
The tool detects subfolder (/en-gb/page), subdomain (en.example.com/page), and country-code top-level domain (example.de/page) patterns. Mixed structures across the same set of URLs are flagged for review.
How many URLs can I process?
Up to 10,000 URLs per session. The sitemap protocol allows 50,000 URLs per file and 50 MB per file (uncompressed). If your output exceeds either limit, the tool will split it into multiple files with a sitemap index automatically. The 10,000-URL input limit keeps the browser responsive during analysis.
How does the AI page matching work?
When URLs across different locales have translated slugs (e.g., /shoes/running and /schuhe/laufen), exact path matching won't group them. The tool uses text embeddings to compute semantic similarity between path segments and clusters pages that are above a confidence threshold, letting you match translated URLs without manual mapping.
What is x-default?
x-default is a special hreflang value that tells search engines which URL to show when no other language/region variant matches the user. It's typically set to your main or English-language page. The tool lets you select any URL as x-default before generating the sitemap.
What output format should I choose?
The tool offers three output formats. 'Single file' puts all URLs in one sitemap, automatically splitting at 50,000 URLs or 50 MB. 'Per-locale files' creates one sitemap per language (e.g., sitemap-en.xml, sitemap-fr.xml), each still containing full hreflang annotations for reciprocal linking. 'Per-category files' groups URLs by content section or source sitemap (e.g., sitemap-products.xml, sitemap-blog.xml). Per-locale is useful for large multilingual sites. Per-category is available when you import from a sitemap index or your URLs have distinct path prefixes.
Does the tool validate my hreflang setup?
Yes. Before generating XML, it checks for invalid hreflang codes, duplicate locales within the same page cluster, missing reciprocal links, orphaned URLs with no translations, and missing x-default. Errors block generation; warnings are shown but don't prevent download.
Does the sitemap include lastmod dates?
When you import URLs from an existing sitemap that includes <lastmod> values, those dates are carried through to the generated output. This helps search engines prioritise which pages to re-crawl. If you paste URLs manually, lastmod is omitted since there is no source date to reference.
Do hreflang links need to be bidirectional?
Yes. Google requires that every page in a hreflang group confirms the relationship. If page A points to page B as its French alternate, page B must also point back to page A. This tool generates reciprocal links automatically and warns if any are missing. See Google's annotation guidelines.
What's the difference between language and region in hreflang?
The language code (e.g., en) targets all speakers of that language globally. Adding a region code (e.g., en-gb) targets speakers in a specific country. Google recommends using region codes when you have country-specific content like different currencies, legal terms, or spelling conventions. You can combine both: en as a fallback with en-gb and en-us for regional variants. See Google's language code documentation.
Should I use subfolders, subdomains, or ccTLDs for multilingual sites?
Each approach has trade-offs. Subfolders (/en/, /fr/) are easiest to manage and consolidate domain authority. Subdomains (en.example.com) offer more server flexibility. ccTLDs (example.de) send the strongest geotargeting signal but split domain authority across separate domains. Google can handle all three with hreflang tags. See Google's multi-regional sites guide.
How do I handle Chinese simplified vs traditional?
Use ISO 15924 script subtags: zh-hans for Simplified Chinese and zh-hant for Traditional Chinese. You can combine with region codes: zh-hans-cn for Simplified Chinese (China), zh-hant-tw for Traditional Chinese (Taiwan). This tool detects bare zh locale segments and suggests adding the appropriate script subtag.
Where should I submit the generated sitemap?
Submit your hreflang sitemap through Google Search Console (Sitemaps > Add a new sitemap). If the tool generated a sitemap index, submit the index file and Google will discover the child sitemaps automatically. You can also reference the sitemap in your robots.txt. See Google's submission guide.

Google documentation references

This tool implements the hreflang specification as documented by Google. For the full details on each topic, see the official guides:

  • →Tell Google about localised versions of your page— hreflang syntax, annotation methods, x-default
  • →Managing multi-regional and multilingual sites— URL structures, geotargeting, locale detection
  • →Build and submit a sitemap— XML format, file limits, sitemap index
  • →Supported language and region codes— ISO 639-1, ISO 3166-1, script subtags
  • →Hreflang in sitemaps— xmlns:xhtml namespace, alternate link syntax

A free tool by Addy

FeedbackTermsPrivacy