Add one row per language version, set the x-default and copy the block. The same complete block goes into the head of every page in the set.
Add your page URLs above. The complete hreflang block, self-referencing tags and x-default included, appears here in HTML and XML sitemap formats.
One row per language version, the page URL, its language and optionally a region. Both codes come from dropdowns, so mistakes like en-UK or underscores cannot happen, and duplicate combinations get flagged.
Point the fallback at your main page or language selector. This is the page users get when their language matches none of your versions, and skipping it means the search engine guesses for you.
Copy the block as HTML head tags or XML sitemap markup. The same complete block, self-reference included, goes into every language version, which is exactly what makes the return-tag rule hold.
Hreflang tags tell search engines which language and regional version of a page belongs to which user. Publish a page in English and Hindi and hreflang is the signal that sends Hindi searchers to the Hindi version instead of letting Google pick one, or worse, treat the two as competing duplicates. It is a serving signal, not a ranking boost, it routes users, consolidates signals across translations and keeps versions out of each other's way.
The format is strict. A two-letter ISO 639-1 language code, optionally followed by a hyphen and a two-letter ISO 3166-1 region code, en for English anywhere, en-IN for English aimed at India, hi-IN for Hindi in India. The most common error in the wild is en-UK, which does nothing, because the United Kingdom's code is GB. Invalid values fail silently, which is why this generator only offers valid codes from dropdowns.
The rule that decides success is reciprocity. Every page in the set must carry the full block, every alternate, the x-default and a link to itself. Audits keep finding the same failure, a new language launches, its page points at the others, but the older pages never get updated to point back, and the missing return tags silently invalidate the whole cluster. One complete block pasted everywhere is the entire trick.
It all runs in your browser. Nothing is uploaded, stored or logged, and the output comes in both formats, HTML link tags for page heads and xhtml:link markup for XML sitemaps, whichever method your site uses. A note on who reads these tags. Each line is a rel="alternate" link that pairs an ISO 639-1 language code with an optional ISO 3166-1 Alpha-2 region code, the syntax Google Search Central documents. Google and Yandex act on hreflang directly. Bing does not, it leans on the content-language signal and on-page language instead, so if a market matters on Bing, state the language clearly in the page itself as well.
Written by Chirag Arora, digital marketing consultant with 17+ years of hands-on SEO experience across 500+ projects. He designed this tool and the other free tools on this site. Verify on LinkedIn.
| Value | Means | Typical use |
|---|---|---|
| en | English, any region | One English version serving the whole world |
| en-IN | English for India | Indian pricing, spelling and examples on an English page |
| hi-IN | Hindi for India | A Hindi translation aimed at Indian users |
| en-GB vs en-US | British vs American English | Separate spellings, currencies or offers per market |
| pt vs pt-BR | Portuguese vs Brazilian Portuguese | The classic pair that needs separating |
| x-default | Everyone else | Your homepage or language selector as the safety net |
Use the language-only form until you truly serve regions differently. en covers every English speaker on earth, and splitting it into en-IN, en-GB and en-US only earns its complexity when the pages themselves differ, in currency, spelling, stock or legal text. Splitting identical content by region adds maintenance without adding value. And remember the codes that trip people, GB not UK for Britain, and the region part is a country, so there is no en-EU.
Treat the output here as one unit. It goes into the head of every language version unchanged, which automatically satisfies the self-reference rule and the return-tag rule at once. The setups that break are the ones where each page hand-rolls its own partial list.
Each language version should have a canonical tag pointing at itself, never at the English original. When a page's canonical points elsewhere, the canonical wins and the hreflang on that page is discarded, which quietly removes it from the cluster. Check this whenever a translated page refuses to appear in its market.
Adding a new language means regenerating the block and re-pasting it on every existing page, not just the new one. The most common real-world failure is a new market whose return tags sit in a backlog while the cluster stays half-broken. Make the re-paste part of the launch checklist.
This free hreflang tag generator builds the complete tag set for a multi-language page as you type. Add a row per version, pick the language and region from dropdowns so invalid codes cannot slip in, set the x-default fallback and copy the result as HTML head tags or XML sitemap markup. Warnings fire live for relative URLs, duplicate values and a missing x-default. There is no sign-up, no credit card and no limit.
Hreflang is the most silently broken tag in SEO. Audits across the industry keep finding the same picture, well over half of international sites carry at least one hreflang error, and over 17+ years of SEO work across 500+ projects I have seen why. The tags get built by hand, a new language launches, the old pages never learn about it, and the missing return links void the whole set without a single visible error. This generator produces one complete, correct block so the failure mode never starts.
It also fits the rest of an international launch. Generate your tags here, then validate the structured data on each version with the free schema validator, build the sitemap with the free sitemap generator, audit any version with the free SEO analyzer, or explore all the free SEO tools on this site.
Preview how your title tag and meta description appear in Google search results, with pixel-width counters and mobile view.
Launch ToolFull on-page SEO audit, title tags, meta descriptions, headings, keyword density and 50+ factors checked instantly.
Launch ToolBuild UTM-tagged campaign URLs with one-click presets for Google Ads, Facebook, Email and LinkedIn.
Launch ToolHreflang tags tell search engines which language and regional version of a page to show each user. If you publish the same page in English and Hindi, hreflang is how Google knows to serve the Hindi version to Hindi-language searchers and the English one to everyone else. It is a serving signal, not a ranking boost, it routes the right version to the right user and stops translated pages competing with each other as duplicates.
A two-letter ISO 639-1 language code, optionally followed by a hyphen and a two-letter ISO 3166-1 region code, like en, en-IN or hi-IN. The classic mistake is en-UK, because the United Kingdom's country code is GB, so the correct value is en-GB. Invalid codes fail silently, the tag sits in your page doing nothing. This generator uses dropdowns for both parts, so an invalid combination cannot be produced.
x-default names the fallback page for users whose language matches none of your versions, a Korean visitor when you only publish English and Hindi, for example. It usually points at your main page or a language selector. It is strongly recommended, without it the search engine guesses which version to serve unmatched users, and its guess may not be the page you would choose.
Because hreflang only works when the links are reciprocal. Every page in the set must list every version, including itself, the self-referencing tag, and the same is true of each alternate page. If page A points to page B but B does not point back, the return tag is missing and the entire cluster gets ignored. That is why this generator outputs one complete block, the same block goes into the head of every page in the set.
Head tags are the simplest for a handful of languages, paste one block into every version of the page and you are done. The XML sitemap method moves the same information into your sitemap, which keeps page code clean and scales better for sites with many languages or thousands of URLs. Both work, pick one method and stay consistent, and this tool generates both formats from the same input.
The usual suspects, in order. Missing return tags, some pages in the set do not carry the full block, which invalidates everything. Invalid codes, most often en-UK instead of en-GB, or an underscore instead of a hyphen. Relative URLs, every href must be absolute, starting with https. And canonical conflicts, if a page's canonical tag points somewhere other than itself, the canonical wins and your hreflang on that page is ignored. Fix those four and most implementations come back to life.
This free tool builds your international tags. If you would rather have your content written or rewritten to read clearly and rank, here are a few honest reasons businesses hire me as their SEO and content consultant in India.
The right length and the right keywords are not opposites. I write content that covers a topic fully and targets the right terms, so it is easy for people to read and easy for Google and AI to understand.
I started as a technical SEO trainee, not in a management seat, and I still write and edit the content myself. You get direct expertise, not a brief handed off to a junior writer.
The hreflang generator you just used, I built it, along with the other free SEO tools on this site. It is a direct look at how I think about clear content before you ever become a client.
AI drafts read stiff and generic. I edit content so it reads naturally at the right level, the kind of clear, human writing that keeps readers engaged and gets quoted in AI answers.
Messages get a reply within 24 hours on business days, and WhatsApp is the fastest way to reach me for anything urgent. You are not waiting in a support queue.
Content length is one piece. Keyword research, on-page SEO and technical health all sit with one person who understands how they connect, so clear writing also becomes ranking writing.
"Chirag rewrote our blog to read at a grade 8 level without dumbing it down. Time on page went up, bounce rate dropped and rankings followed. He makes complex topics simple."
"Our content was dense and technical and nobody finished reading it. Chirag simplified everything and our engagement metrics transformed. His 17+ years of experience really shows."
"We used Chirag's free tools, then had him edit our whole site. Clear, engaging copy that actually converts. Practical, no fluff, real value."
Featured on leading media platforms. Watch interviews, expert commentary and digital marketing insights covered by top news channels and podcasts.
CMD Club Meet 2025 at Club Capri, Gurgaon : A Brief of ClipsTrust
YouTube · Business Meet
How to Build Customer 🔥Trust 🔥 - Biggest Challenges Today
Eventra vlogs
Digital Marketing Beginner to Advanced Journey | Podcast b/w Chirag Arora & Pankaj
YouTube · Podcast Episode