Hreflang Generator
Generate valid, reciprocal hreflang tags for all your language and regional versions. This free hreflang tag generator outputs HTML link tags, XML sitemap entries or an HTTP header — and everything runs in your browser.
Try an example
Language versions
The version shown when no other language matches the visitor — usually your default or an international landing page.
Bulk import
Paste one entry per line: either a bare URL, or a code and URL separated by a comma (e.g. en-US, https://example.com/us/). Up to 50 rows.
Check these before publishing
- Add at least two complete versions (language + URL) — hreflang always describes a set of alternates.
Add at least two language versions with a URL to see the generated hreflang markup here.
How reciprocal linking works
hreflang only works when the annotation is bidirectional: if your English page points to the German one, the German page has to point back — and every page must also reference itself. Miss a return link and search engines quietly drop the whole cluster. This generator always emits the complete set, so the same block is valid on every page in the group.
- ↔Reciprocal link (both directions)
- ↺Self-reference
- ⇢x-default fallback
Language codes, regions and formats
A language code alone (like en) targets a language wherever it is spoken. Add a region (like en-US or en-GB) only when the content genuinely differs by market — different currency, spelling or offers. Over-segmenting with regions you do not actually serve just creates maintenance work.
The three output formats are equivalent; pick the one that fits your setup. HTML link tags go in the head area of each page and are the most common choice. XML sitemap entries keep the annotations out of your markup and scale well for large sites. HTTP headers are the way to annotate non-HTML files such as PDFs.
For the authoritative rules, see Google's documentation on telling Google about localized versions of your pages: Google Search Central – localized versions.
Frequently asked questions
Do I need hreflang on every page?
What is x-default and when should I use it?
What is the difference between en and en-US?
Why does Search Console report "no return tags"?
Does the casing of the ISO codes matter?
Should I use HTML tags or the XML sitemap method?
Are hreflang tags a ranking factor?
Are my URLs sent to a server?
Related tools
Open Graph / Meta Tag Generator
Generate Open Graph and Twitter/X Card meta tags for correct link previews.
SERP Snippet Preview
Preview your Google snippet and check title & description pixel width.
Breadcrumb Schema Generator
Generate BreadcrumbList JSON-LD to show navigation paths in Google results.
Schema Markup Validator
Validate a live URL or JSON-LD code: SEO score, errors, warnings and rich-results readiness.
Organization Schema Generator
Generate Organization JSON-LD with logo, social profiles and contact for E-E-A-T.
Local Business Schema Generator
Generate Local Business JSON-LD structured data for your business.
