Hreflang Tag Generator — International SEO Markup | LazyTools

Free SEO Tool · Hreflang · International SEO · Multilingual

Hreflang Tag Generator

Generate hreflang tags for multilingual websites. HTML or XML sitemap format, x-default support, unlimited languages. Copy or download. Free.

🌐 Hreflang Tag Generator
🌐 Language/region URLs

One row per language version.

x-default URL
Format
📋 Generated tags
Add languages above.
🌐 Hreflang🗺️ x-default📄 HTML+XML⬇ Download

How to Use the Hreflang Tag Generator

Add one row per language version with the language code and full URL. Furthermore, set the x-default URL as the fallback for unlisted languages. Additionally, choose HTML link tags or XML sitemap format depending on your implementation preference.

  1. Add language/region pairsEnter ISO 639-1 codes (en, fr, de) with optional ISO 3166-1 region (en-US, en-GB, pt-BR). Furthermore, URL is the full canonical URL. Additionally, each row is one language version.
  2. Set x-defaultThe fallback for unlisted languages — typically the English or international version. Furthermore, recommended but not required. Additionally, Google uses it as the default when no language match is found.
  3. Choose HTML or XML formatHTML goes in the page head section. Furthermore, XML goes inside sitemap.xml. Additionally, both methods are equally valid.
  4. Copy all tagsPaste on every language version of the page. Furthermore, every version must reference all others including itself. Additionally, this reciprocal requirement is the most common error.
  5. ValidateCheck Search Console International Targeting. Furthermore, allow 2–4 weeks for processing. Additionally, use Screaming Frog for bulk hreflang validation.

What Are Hreflang Tags?

Hreflang tags tell search engines which language versions of a page exist. Furthermore, Google uses them to serve the correct version based on user location and language. Additionally, without hreflang, Google may show the wrong language in search results.

<link rel="alternate" hreflang="en" href="https://example.com/en/"> <link rel="alternate" hreflang="fr" href="https://example.com/fr/"> <link rel="alternate" hreflang="x-default" href="https://example.com/">
Reference: Google — hreflang documentation | Bing — meta language tag.

Common Hreflang Errors

ErrorFix
Missing reciprocal linksEach page must reference all versions including itself
Invalid language codeUse ISO 639-1: en not eng, fr not fra
Non-canonical URLHreflang href must match canonical URL
Missing x-defaultAdd fallback to international version

Language vs Region Targeting

Language-only codes (en, fr) target global speakers. Furthermore, language-region codes (en-US, en-GB) target specific countries. Additionally, use language-only when content is identical across regions.

Reciprocal Linking Requirement

Every page in a hreflang set must reference all others — including itself. Furthermore, one-way links are ignored by Google. Additionally, this is the number one implementation failure cause.

HTML vs XML Sitemap Implementation

HTML link tags go in the head section. Furthermore, XML uses xhtml:link inside each URL entry. Additionally, HTTP headers are a third option for non-HTML documents like PDFs.

Hreflang and Canonical Tags

The hreflang URL must match the canonical URL exactly. Furthermore, conflicting signals cause both to be ignored. Additionally, each language version's canonical must self-reference, not point to the default language.

ISO Language Code Reference

LanguageCodeWith region
Englishenen-US, en-GB, en-AU
Frenchfrfr-FR, fr-CA
Germandede-DE, de-AT
Spanisheses-ES, es-MX
Portugueseptpt-BR, pt-PT
Chinesezhzh-Hans, zh-Hant
Arabicarar-AE, ar-SA
Japanesejaja-JP

Frequently Asked Questions

HTML tags specifying language versions of a page. Furthermore, Google uses them for correct language serving. Additionally, prevents wrong-language results.
Recommended, not required. Furthermore, fallback for unlisted languages. Additionally, typically English or international version.
Both equally valid. Furthermore, HTML in head, XML in sitemap. Additionally, HTTP headers for PDFs.
Missing reciprocal links. Furthermore, each page must reference all versions. Additionally, Google ignores one-way hreflang.
ISO 639-1: en, fr, de. Furthermore, add region: en-US, pt-BR. Additionally, 'eng' is invalid — use 'en'.
Affects which URL ranks in which market. Furthermore, not overall rank. Additionally, prevents duplicate content.
2–4 weeks. Furthermore, monitor Search Console. Additionally, large sites take longer.
Hreflang URL must match canonical. Furthermore, conflicts invalidate both. Additionally, each version canonicals to itself.

Related SEO Tools

Canonical Tag Generator

Canonical must match hreflang. Furthermore, conflicts break both signals.

Open Graph Preview

OG tags per language. Furthermore, og:locale complements hreflang.

UTM Builder

Track campaigns per region. Additionally, UTM URLs should not appear in hreflang.

FAQ Generator

FAQ per language. Furthermore, schema must be translated per version.

Breadcrumb Schema Generator

Breadcrumbs per language. Additionally, labels should be translated.

Bounce Rate Calculator

Engagement per language. Furthermore, high bounce signals hreflang issues.

Rate this tool

4.2
out of 5
410 ratings
5 ★
60%
4 ★
24%
3 ★
5%
2 ★
2%
1 ★
9%
How useful was this tool?