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

Hreflang Sitemap Generator

Generate valid multilingual XML sitemaps with hreflang tags. Paste URLs or import from a sitemap, review detected locales, 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.

15 URLs detected

How it works

  1. 1

    Add your URLs

    Paste multilingual URLs one per line, or import them from an existing sitemap URL. The tool parses subfolder, subdomain, and ccTLD patterns automatically.

  2. 2

    Review and adjust

    Most locales and page groups are detected deterministically using pattern matching. When ambiguous codes or translated slugs are found, AI suggests matches with confidence scores. You review and accept everything before generation.

  3. 3

    Download the XML

    The validator checks for common hreflang errors before generating the sitemap. Download as a single XML file or a ZIP with automatic splitting for large sites.

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

International SEO features

Three URL structure patterns

Detects and handles all three approaches to multilingual URLs: subfolder (/en-gb/), subdomain (en.example.com), and ccTLD (example.de). Mixed patterns across the same site are flagged for review. Google's multi-regional sites guide covers the trade-offs of each approach.

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. Most codes are resolved via static lookup. For ambiguous segments (e.g., /hk/ could be English or Chinese), AI suggests the most likely locale based on URL context. Chinese locales are flagged when they may need zh-hans/zh-hant script subtags.

x-default fallback

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

Translated slug matchingAI-assisted

When localised URLs use translated slugs (e.g., /shoes/running and /schuhe/laufen), path matching alone can't group them. 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 with the xmlns:xhtml namespace for hreflang links, self-referencing alternates, and automatic file splitting when output exceeds the protocol's 50,000-URL-per-file limit.

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.
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.
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 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.
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.
How many URLs can I process?
Up to 10,000 URLs per session. The sitemap protocol allows 50,000 URLs per file, and if your output exceeds that the tool will split it into multiple files with a sitemap index. The 10,000-URL input limit keeps the browser responsive during analysis.
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.
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.
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

TermsPrivacy