Hreflang Tag Generator
Build the correct <link rel="alternate" hreflang="..."> tags for your page's language and region versions, so search engines serve the right one to the right visitor — nothing is uploaded, everything runs right in your browser.
✓ Reciprocal Link Checker · Code Format Checker
hreflang="en" — language only
hreflang="x-default" — fallback (Pro)
<link rel="alternate" ...>
How to Use the Hreflang Tag Generator
Build a correct hreflang block for one page family, or manage many at once in Pro Mode — entirely in your browser, with no signup.
Everything above runs entirely in your browser using plain JavaScript — no page is fetched or crawled, and nothing you type is ever uploaded to a server.
Hreflang Tag Generator: Build Correct Multi-Language Tags, Free, Right in Your Browser
Quick answer: Enter the language-region code (like en-us or fr-fr) and the URL for each version of a page, and this tool builds the complete, ready-to-paste set of <link rel="alternate" hreflang="..." href="..."> tags for that page group, free, with no signup, entirely in your browser. Pro Mode adds an x-default fallback, bulk import for many page groups at once, a reciprocal link checker, and a language-region code format checker.
Hreflang is the HTML attribute search engines use to work out which language or regional version of a page to show a given visitor, when the same content exists in more than one language or is localized for more than one country. Google's own guidance, Tell Google about localized versions of your page, documents the required syntax and the rules this tool follows: each alternate URL gets its own <link rel="alternate" hreflang="..." href="..."> entry, the code is a language subtag optionally followed by a region subtag, and a page should include an entry pointing back at itself as well as at every other version.
1What This Tool Actually Builds
Add a language-region code and a URL for every version of a page — the English (US) version, the English (UK) version, the French version, and so on — and the tool returns the full block of hreflang tags for that page group, in the order you entered them. Because every page in a correctly implemented language set should carry the identical block, you paste the exact same output into the <head> of each version, not a customized one per page. That detail trips people up more often than the syntax itself: the hreflang block for your English page and your French page should list the same set of alternates, including each page's own URL.
2Simple vs Pro
| Feature | Simple | Pro |
|---|---|---|
| Add unlimited language-region code + URL pairs for one page group | ✓ | ✓ |
| Generate, copy & download the complete hreflang block | ✓ | ✓ |
| x-default fallback entry per page group | — | ✓ |
| Bulk import: build many page groups from one pasted list | — | ✓ |
| Reciprocal link checker across page groups | — | ✓ |
| Language-region code format checker, with fix suggestions | — | ✓ |
Simple Mode covers a single page's language set well: list every version, generate the block, done. Pro Mode, currently free to use, is built for sites with more than one translated page family — building hreflang for a homepage, a pricing page, and a handful of blog posts all at once — and for catching the two mistakes that quietly break hreflang most often: missing return links and malformed codes.
3The Reciprocal Link ("Return Tag") Mistake
Hreflang is meant to work both ways: if your English page declares an alternate pointing to your French page, your French page needs to declare an alternate pointing back to the English page. SEO guides that round up common hreflang errors, including Semrush's list of common hreflang errors, consistently call this out as one of the most frequent problems in real implementations, often called a missing "return tag." Google has documented that it will disregard a hreflang annotation it can't confirm with a matching one on the other page, so a one-directional pair is effectively ignored rather than partially honored. Pro Mode's Reciprocal Link Checker reviews the page groups you've entered and flags exactly this pattern: a group referencing a URL that belongs to another group, without that group linking back.
No Ahrefs keyword-volume export was supplied for this tool. The focus keyphrase and related keyphrases below come from reading Google's own hreflang documentation and from live web research into existing hreflang tools and guides, not from an estimated search-volume figure.
4Who Actually Needs Hreflang Tags
If every page on a site only ever exists in one language, hreflang tags don't apply. They become relevant the moment the same content, or a close localized equivalent, exists at more than one URL for different languages or regions — which is exactly the scenario where search engines otherwise have to guess, and where guessing can mean a visitor in Germany lands on the English page instead of the German one.
5x-default, and the Codes Checker Watches For
x-default is an optional entry, documented alongside the standard hreflang syntax, that marks a fallback page for visitors whose language or region doesn't match any version you've listed — commonly a language-selector page or a default international version. It isn't a real ISO language code, which is exactly why it needs its own field in Pro Mode rather than being typed into the regular code input. For the codes that are meant to be real, this tool's Code Format Checker looks for the three mistakes that show up constantly in hand-written hreflang: an underscore in place of the required hyphen (en_us instead of en-us), the language and region typed in the wrong order (us-en instead of en-us), and a code that isn't a recognized language or region at all (english-usa). It also recognizes the less common but legitimate forms Google's documentation allows, such as a language on its own (en) or a UN M49 macro-region number for region-spanning pages (es-419 for Latin American Spanish).
Every language code, URL, and bulk-imported page group you type is processed entirely by JavaScript running in your own browser tab. Nothing is fetched, crawled, uploaded, or stored on a server at any point, in Simple Mode or Pro Mode.
6Frequently Asked Questions
Grounded in documented SEO guidance, not guesswork. This tool's syntax and defaults follow Google's own documentation on localized page versions, and its reciprocal-link framing draws on independent guides to common hreflang errors, including Semrush's "9 Common Hreflang Errors" and Ahrefs' beginner's guide to hreflang, rather than an arbitrary rule set.
More SEO & GEO Tools
Every other tool in the SEO & GEO Tools category