Multilingual and multi-regional sites face a coordination problem: the same content lives at several URLs, and crawlers need to know which URL serves which audience. Hreflang annotations solve this — but they're notoriously fiddly to hand-write, with strict reciprocity rules and two different valid formats. This tool generates both from one simple locale/URL table.
Why it matters for AI search: language matching matters more in AI answers than in classic search results. When someone asks an AI assistant a question in French, the most useful citation is your French page — but the assistant's crawler can only route to it reliably if your site declares which URL is the French variant. Hreflang is that declaration. Without it, multilingual sites commonly see their English version cited to non-English users, or worse, see variants compete as near-duplicates.
How this tool works: build your locale matrix row by row — a locale code on the left (with autocomplete suggestions for common codes like en-GB, de, pt-BR, and the special x-default), the full URL for that locale on the right. The output panel generates two formats from the same input: <link> tags ready to paste into the <head> of every page in the set, and XML sitemap entries using xhtml:link alternates, wrapped in a valid urlset with the xhtml namespace declared — the scalable approach for larger sites. Both update live; remember that the same complete set of annotations must appear on (or for) every variant in the group, including a self-reference.
Limitations: this tool generates annotations for one page group at a time — a site with 50 translated pages needs 50 runs or (better) a templated implementation in your CMS using this output as the reference pattern. It validates locale codes only loosely, so double-check that your codes follow ISO 639-1 language (+ optional ISO 3166-1 region) format — en-GB, not en-UK, is the classic mistake. And hreflang solves variant routing, not translation quality or content parity; crawlers may ignore annotations pointing at pages whose content doesn't actually correspond.