Hreflang Generator
Generate hreflang link tags for multilingual and regional pages, with optional x-default. Runs entirely in your browser.
π Runs entirely in your browser β nothing is uploadedWhat the Hreflang Generator does
The Hreflang Generator builds the <link rel="alternate" hreflang="β¦"> tags that tell search engines how the language and regional versions of your pages relate to one another. You list each locale code alongside the URL that serves that audience, and the tool produces a clean block of link tags you can paste into the page head. It also supports an x-default entry, the special value that points to a fallback page for visitors whose language or country you do not explicitly target.
Hreflang solves a specific problem for international sites: when you have similar content in several languages or for several countries, search engines need to know which version to show each user, and that these versions are alternates rather than duplicate content competing against each other. Correct annotations help a French speaker land on your French page and a UK visitor on your British-English page, which improves relevance, reduces bounce, and prevents the wrong regional pricing or spelling from appearing in results.
Getting the codes and reciprocity right
Hreflang values use an ISO 639-1 language code, optionally followed by an ISO 3166-1 Alpha-2 country code β for example en, en-GB, fr or pt-BR. The language comes first and the region is optional; use a region only when you genuinely serve different content to different countries that share a language. The single most common mistake is missing reciprocity: every page in the set must list every other page, including itself. If page A points to page B but page B does not point back, search engines may ignore the annotations entirely, so add the full block to all alternates.
Private, browser-based workflow
The tags are generated locally with client-side JavaScript, so your URLs and site structure are never uploaded. That is convenient when you are planning a new market launch or staging localized pages that are not yet public. After deploying, validate the implementation with an hreflang testing tool and check the International Targeting report in Google Search Console for return-tag errors, then re-generate whenever you add a language or change a URL.
How to use
- Add locale and URL pairsEnter a language or language-region code and the matching page URL on each line.
- Optionally add x-defaultMark one URL as the default fallback.
- Copy the tagsPaste the hreflang link tags into the <head> of every listed page.