B3Build line
hreflang sitemap generator
Paste a table with one column per language and one row per page, straight from a spreadsheet. Every URL gets the full set of alternates, itself and x-default included, and the codes are checked before you publish.
Pages × languages
tab · commaCopy cells from Sheets or Excel and paste; tabs are kept. Nothing leaves your browser.
Language codes
- The header row's codes appear here, checked.
Optional: the page for visitors whose language matches none of the codes, often a language picker or the main version.
hreflang sitemap
xmlns:xhtmlhreflang sitemap
Checks codes, self-references, return links and conflicting alternates.
Findings
The rules the generator follows
Each URL in a row gets a <url> entry listing every version of that page, including itself. That makes the annotations reciprocal: if the German page names the English one, the English page names the German one back, which search engines require before they trust the pair.
Codes are a two-letter language (de), optionally a script (zh-Hant) and optionally a two-letter country (de-AT). A country alone is not valid, the United Kingdom is GB rather than UK, and groupings such as EU or 419 are not countries. x-default is the fallback. A URL may appear in only one row; versions on other domains are fine when you have verified those sites.
FAQ
Sitemap, HTML tags or HTTP headers?
All three carry the same information. A sitemap keeps your templates untouched and suits large sites; use one method per page set, not several that might disagree.
Do I need x-default?
No, it is optional. Add it when you have a page that suits visitors whose language you do not cover.
Can two codes point to the same URL?
Yes, for example en-GB and en-IE sharing one English page. What breaks the set is one code pointing to two different URLs for the same page.