Skip to content
Join

hreflang Tag Generator

Generate correct hreflang tags for multilingual and multi-region sites — as HTML link tags or an XML sitemap block — with validation that catches the mistakes Google flags.

on-device urls → hreflang free · no account
<link hreflang>

hreflang Tag Generator

VALIDATED

Generate hreflang without making hreflang mistakes. Reciprocity and self-references are built in, ISO codes are checked live, and you get one clean block to paste on every page. 100% in your browser.

Language / region versions
LanguageRegion (optional)URLx‑default
x‑default = the fallback for users no version matches (usually your language selector or main site). Pick at most one.
Bulk paste (locale, URL — one per line)
Codes are auto-fixed: en_us → en-US, en-uk → en-GB.
Paste this exact block on every page below — that's what makes the return links reciprocal.
<head> tags
Add your language versions to generate tags.
Validation
Enter at least two versions to check.

processed in your browser · never uploaded

How to use it

hreflang Tag Generator
in three moves.

01

Add each language version

Enter the URL of each translated page and pick its language, and region if it targets one (e.g. en, en-GB, es, es-MX).

02

Set your default

Add an x-default entry for your language selector or fallback page, so users and search engines have a home when no version matches.

03

Copy or download

Take the HTML tags for your , or the XML block for your sitemap. Put the same set on every language version.

Formats & limits

What goes in, what comes out.

Format field guide
Input Output Typical saving Best for
page URLs + codes HTML link tags Adding hreflang to the of each page
page URLs + codes XML sitemap block Managing hreflang centrally in your sitemap
Why this one

Built against the ways these tools disappoint.

We ran the same files through the popular alternatives first. These are the gaps we found, and what this tool does instead.

01

hreflang breaks silently — one wrong code and Google just ignores it.

Every entry is validated against real ISO language and region codes as you type, so you don't ship tags that quietly fail.

test: enter an invalid code like "en-UK" and watch the flag
02

The rules require return tags, and most people miss them.

hreflang must be reciprocal — every version must link to every other. This builds the complete, symmetric set for you.

test: add three versions and check each references the others
03

You get one flat output whether it fits your setup or not.

Choose HTML tags for the page head, or an XML block for your sitemap — whichever your site uses.

test: switch between the HTML and XML tabs
The detail

How this actually works.

An hreflang tag tells search engines which language or regional version of a page to show which users — so a French speaker sees your fr page, and a shopper in Mexico sees es-MX rather than es-ES. Getting it right keeps the correct version in search results and stops your own translations competing as duplicate content. Getting it wrong is easy, and Google’s response to a mistake is simply to ignore the tag — with no warning.

That silent failure is what this tool is built to prevent. It validates every entry as you build it, catching the errors that actually break hreflang in the wild: a missing self-reference (every page must point to itself), missing return tags (if page A points to B, B must point back to A, or Google discards both), wrong codes (people write “jp” for Japanese when the correct code is “ja”, or use “uk” thinking United Kingdom when it actually means Ukrainian), and relative URLs where hreflang requires absolute https:// ones.

You add each language version with its language and optional region code — following the ISO 639-1 language and ISO 3166-1 country standards — set an x-default for users whose language matches none of your versions, and export. Choose HTML <link> tags for each page’s head, or an XML block for your sitemap, depending on how your site is set up — just don’t use both methods for the same URLs. Everything runs in your browser; there’s nothing to upload and no signup.

Building out your technical SEO? The llms.txt Generator creates the AI-crawler equivalent for your site.

FAQ

The questions people actually type in.

What is an hreflang tag?

It tells search engines which version of a page to show users in different languages or regions — so a Spanish speaker in Mexico gets your es-MX page, not the English one. It's the core of international SEO.

Do I need a region code, or just a language?

Language alone (e.g. es) is fine when the content suits all speakers of that language. Add a region (e.g. es-MX) only when you have genuinely different content for that country. Don't invent regions you don't have pages for.

What is x-default for?

It's the fallback for users whose language or region doesn't match any of your versions — usually your language-selector page or your main international page. It's optional but recommended.

Where do the tags go — the page or the sitemap?

Either, not both for the same URLs. HTML tags go in each page's ; the XML version goes in your sitemap. Pick whichever is easier to maintain, and keep the full set on every version.

Why is my hreflang being ignored?

Almost always a missing return tag (the versions must all reference each other), a wrong or invented code, or relative URLs — hreflang needs absolute https:// URLs. This tool checks for all three before you export.

Next

Tools people use with this one.

All 18 tools
rules → robots.txt

robots txt Generator

Build a valid robots.txt with the right allow/disallow rules, crawl-delay and sitemap line — with warnings for the mistakes that accidentally block your whole site from Google.

on-device Open
site → sitemap.xml

XML Sitemap Generator

Build a valid XML sitemap by discovering your pages automatically or pasting a URL list — with lastmod, priority, and automatic splitting for sites over 50,000 URLs.

on-device Open