Free Hreflang Tag Generator

INTERNATIONAL SEO · FREE TOOL

Connect your language and regional pages with accurate hreflang markup.

Generate HTML tags or XML sitemap annotations, including x-default. No account, payment or API needed. Your entries are processed in this browser and are not sent to Degates.

← All free SEO tools

1. Add your alternate URLs

Use a language such as en, a language-region such as en-GB, or x-default for your fallback. Optional script codes, such as zh-Hant, are supported. Add at least two alternate entries.

Only absolute HTTP or HTTPS URLs are accepted. Use equivalent, indexable pages with reciprocal annotations. Fragments and URLs containing login credentials are rejected.

Answer this simple addition question before generating code.

How to use the Hreflang Tag Generator

  1. Add one entry for each language or regional version of the same page. Include the current page and, optionally, an x-default fallback.
  2. Generate the code. Choose HTML tags or XML sitemap output.
  3. For HTML, put the identical complete set inside the <head> of every alternate page. For XML, include each page’s self-reference and all alternates; upload each host’s sitemap at its root or integrate with your sitemap system.
  4. Check that your URLs are canonical, crawlable and indexable, and that every alternate points back to the others. Regenerate when URLs change.

This tool checks input syntax; it does not fetch URLs, verify translations or guarantee Google indexing. Choose the implementation method that fits your site; you do not need both HTML and XML.

Read Google’s hreflang implementation guidelines

Frequently asked questions

What is hreflang?

Hreflang identifies equivalent language or regional versions of a page so search engines can understand which version is intended for each audience.

What does x-default mean?

It identifies a fallback page for visitors whose language or region does not match the other entries, often a language selector or general page.

Which language and region codes can I use?

Use an ISO 639-1 two-letter language, optionally with an ISO 3166-1 two-letter region, such as en-GB. Supported script examples include zh-Hans and zh-Hant. A region alone, such as US, is not a language.

Do I need reciprocal and self-referencing tags?

Yes. Each alternate should include itself and link to every other alternate, with the same set repeated on those pages.

Can alternate pages be on different domains?

Yes. HTML annotations can reference different domains. XML output is separated by host so each sitemap lists its own host’s pages while referencing the complete alternate set.

Is my data saved or submitted?

This generator does not submit, store or fetch your entries. Code generation, copying and downloading happen in your browser. Refreshing the page clears the form.