Generate hreflang tags for multilingual sites as HTML, HTTP headers or XML sitemap entries. Validates codes and catches duplicates. Free, no signup.
First time here? Add a row for each language version with its URL Your input is processed locally and disappears when you close the tab.
Hreflang tells search engines which language version of a page to show which visitor. Done right it stops your Spanish page outranking your English one for English readers. Done wrong — which is common — it does nothing at all. Our free hreflang generator builds the tags and flags the mistakes that silently break them.\n\nThe rule implementations fail on most often is reciprocity: every version must reference every other version, including itself. If your English page lists the Spanish alternate but the Spanish page does not list back, Google discards the whole cluster. No error appears anywhere; the tags simply have no effect. This tool generates the full self-referencing set and states the requirement plainly.\n\nIt also catches duplicate hreflang codes, which invalidate a set, and non-absolute URLs, which are ignored. Codes are built from proper ISO 639-1 language and ISO 3166-1 Alpha-2 region pickers, so you cannot accidentally produce something like a bare region code.\n\nOutput comes in three forms: HTML link tags for most sites, HTTP headers for non-HTML files such as PDFs, and XML sitemap entries, which scale best for large sites because everything is declared centrally instead of in every page's head. Pair it with the XML Sitemap Generator and the Meta Tag Generator for the rest of your international setup.
Add a row for each language version with its URL
Set an x-default fallback if you have one
Pick HTML, HTTP header, or sitemap output
Fix any duplicate or invalid-code warnings
Add the tags to every version, including the page itself
The fallback for visitors whose language and region match none of the above. Usually your global or language-picker page.
Every page must list every version, including itself. This is the rule hreflang implementations fail on most often. If your English page lists the Spanish one but the Spanish page does not list back, Google ignores the whole set.
Language codes are ISO 639-1, region codes are ISO 3166-1 Alpha-2. A region alone is invalid —en-GB is correct, GB on its own is not.