Hreflang Generator
Turn language/region + URL rows into the full reciprocal hreflang set in all 3 Google formats — HTML head, XML sitemap and HTTP header.
Loading tool controls…
Verify it yourself: press F12, open the Network tab, and use this tool — your files are never uploaded.
Hreflang Generator at a glance
- Price
- Free
- Account
- Not required
- File uploads
- None — your files are never uploaded
- Category
- Text Tools
Who uses Text Tools?
Writers, editors, students and anyone who works with words — from counting words in an essay to comparing two drafts.
How to Use Hreflang Generator
Follow these simple steps to get instant results in your browser.
Add One Row per Language Version
Enter the ISO language code, an optional region, and the page URL for each version — the sample shows English, English-GB, French and German.
Set x-default
Enter the language-selector or global homepage URL used when no version matches.
Copy the Format You Need
Switch between HTML head tags, XML sitemap and HTTP headers, fix any flagged errors, then copy or download.
What is Hreflang Generator & How Does It Work?
Hreflang Generator turns rows of language/region plus URL into the complete reciprocal hreflang tag set in all three formats Google supports: HTML <link> tags for the <head> of every page, <xhtml:link> entries for an XML sitemap, and HTTP Link headers for non-HTML files such as PDFs. One set of rows, three outputs, ready to paste.
Hreflang tells Google which language and region each version of a page is for — hreflang="en-GB" for the British English page, hreflang="fr" for the French page — so searchers see the right version. It is a hint, not a redirect: it does not send visitors to the right version by itself. The tool validates ISO 639-1 language codes (lowercase, e.g. en) and ISO 3166-1 region codes (uppercase, e.g. GB), and flags the common mistakes: wrong case, duplicate languages or URLs, malformed URLs, and a missing x-default. Self-reference is built into every generated set, but each page must actually carry the set when published.
The most common hreflang mistake is missing reciprocal links: page A links to page B, but page B does not link back, and Google then ignores the hreflang. This generator outputs the same full set for every page, so reciprocity is built in — but each page must actually carry the set when published, which only you can verify on your site.
Key Features & Capabilities
All Three Google Formats
HTML head tags, XML sitemap entries and HTTP Link headers from one set of rows.
ISO Code Validation
ISO 639-1 languages and ISO 3166-1 regions checked, with case auto-normalised.
Common-Mistake Checks
Duplicates, malformed URLs, missing x-default and self-reference all flagged.
x-default Support
A dedicated x-default row for the language selector or global homepage.
Copy or Download
Each format copies to the clipboard or downloads as a file.
Pro Tips
- •Bookmark this tool for instant one-click access anytime.
- •Drag and drop files directly onto the input surface for fastest handling.
- •All processing happens in your browser session for maximum speed and data safety.
🎯 Common Use Cases
Sources & Further Reading
- Localized Versions (hreflang) — Google Search Central
- Hreflang — Wikipedia
- ISO 639-1 — Wikipedia
Frequently Asked Questions about Hreflang Generator
Frequently asked questions
More Text Tools
Complementary utilities for your workflow
Hreflang Generator
Hreflang tags in HTML, sitemap and header formats.
AI Text Humanizer
Rewrite AI drafts to sound natural with word and sentence rules — rule-based, not an AI model.