Add one row per language or regional version of your page. The HTML link tags and a complete, self-referencing XML sitemap block update as you type — nothing is uploaded, everything happens in your browser.
The xmlns:xhtml="http://www.w3.org/1999/xhtml" declaration on the <urlset> element is required — without it the xhtml:link entries are not valid and search engines will not read them. If you paste these <url> entries into an existing sitemap, make sure its <urlset> tag carries that declaration.
Build valid hreflang link tags and a self-referencing XML sitemap block for multilingual pages — with live validation.
100% free · No sign-up · No daily limits · No watermarks · Processed in your browser — files never leave your device
Build the complete hreflang set for a multilingual page: HTML link tags for the head and a self-referencing XML sitemap block, with live checks for invalid codes, duplicates and non-https URLs.
A shop sells in three markets from one product page: the US version at https://example.com/en-us/shoes, the UK version at https://example.com/en-gb/shoes and a global fallback at https://example.com/shoes. Three rows (en-us, en-gb, plus the x-default field) produce three link tags and a sitemap where each URL entry lists all three alternates — so Google sends US searchers to the dollar-priced page and UK searchers to the pound-priced one instead of whichever it happened to crawl first.
The generator normalises every code the way Google expects it — language subtag lower-case, script title-case, region upper-case — and validates the shape (two or three letters, optional four-letter script, optional two-letter or three-digit region, or the special x-default). The sitemap output follows Google’s own pattern: one <url> entry per page whose <loc> is that page, containing the FULL set of <xhtml:link> alternates including a self-reference, under a <urlset> that declares the xmlns:xhtml namespace.
Hreflang tells search engines which language and region each version of a page is for, and which pages are versions of each other. Without it, Google guesses — and often shows the wrong-language or wrong-currency page to a searcher. With it, each searcher is offered the version written for them.
x-default names the fallback page shown when a visitor’s language and region match nothing in the set — often a language-selector page or your main-market version. It is optional, but recommended whenever you have a sensible fallback; it is a value in the set, not a page language.
Either — Google reads both. HTML tags suit small sets and hand-built pages, and must be added to every page in the set. The sitemap suits large or CMS-driven sites because the whole set lives in one file and pages do not each need editing — but the sitemap must then list every URL with the full alternate set, exactly as this tool generates it.
The usual causes: one page in the set missing its return tags, a tag pointing at a redirected, blocked or non-200 URL, conflicting signals (a canonical pointing at a different language version), or codes in the wrong shape. Paste your set back into this tool to check the codes, then verify every page in the set carries the identical full set.
Yes — a language-only code such as es or fr targets every speaker of that language worldwide. Add regional versions (es-ES, es-MX) only when the pages genuinely differ by market; splitting a set you cannot maintain produces thin duplicates instead of coverage.
They do not boost a page directly. What they fix is matching: the right version gets shown to the right searcher, which reduces wrong-language landings and the duplicate-content confusion that comes from near-identical regional pages competing with each other.
What is missing, broken, or could be better on this tool? Tell us — we read every suggestion.
✅ Thanks — your suggestion has been received. Suggestions like yours shape what we build next.