SEO 100% in your browser

Hreflang Tag Generator — Multilingual SEO Tags for Google

Generate hreflang link tags for multilingual sites. Output as HTML <link>, HTTP Link header, or sitemap.xml. Supports x-default, all valid language-region codes.

Format: lang-code URL — separator can be space, tab, comma, or pipe.
URL shown to users whose language is not in your list. Typically your English/main page.

Hreflang Tag Generator — Tell Google About Your Multilingual Pages

Generate hreflang tags for multilingual or multi-regional websites. These tags tell Google (and other search engines) which version of a page to serve to users of a given language or country. Output is available in three formats: HTML <link> tags for the page <head>, HTTP Link header (for non-HTML files like PDFs), or sitemap.xml xhtml:link elements (efficient for large sites).

Why hreflang matters

  • Right version, right user: a French speaker searches and lands on your French page directly, not the English one
  • No duplicate content penalty: Google knows your English, French, and Spanish pages are the same content in different languages, not duplicates
  • Better UX, better CTR: users click results in their own language at higher rates

Language code format

Use ISO 639-1 (two letters) for language, optionally followed by ISO 3166-1 alpha-2 (two letters) for region:

  • en — English (any region)
  • en-US — English, United States
  • en-GB — English, United Kingdom
  • fr — French (any region)
  • fr-CA — French, Canada
  • zh-Hans — Simplified Chinese (script subtag)
  • zh-Hant — Traditional Chinese
  • pt-BR — Portuguese, Brazil

x-default

The special x-default value points to the page shown when no other hreflang matches the user’s language. Typically this is your main English page or a language-selector landing page. Always include it.

Three rules to follow

  1. Self-reference: each page must include a hreflang tag pointing to itself. So the English page lists EN, FR, ES, DE etc — not just the other languages.
  2. Bidirectional confirmation: if your English page links to a French version, the French page must also link to the English version. Google ignores one-directional hreflang.
  3. Absolute URLs: always use full URLs (https://example.com/page) — never relative paths.

Output formats

  • HTML <link> tags: paste into the <head> of each page. Most common method. Works for any HTML page.
  • HTTP Link header: for non-HTML resources (PDFs, images). Set as a response header by your server.
  • Sitemap XML: efficient for large sites — declare all hreflang relationships in your sitemap.xml without modifying each page.

Validate after deploying

Use Google Search Console’s “International Targeting” report to find missing return tags and other hreflang errors. Errors there mean your hreflang isn’t working.

Privacy

Everything runs in your browser. Your URL list is never uploaded.