Developer tool

Hreflang Tag Generator

Generate and validate hreflang link tags from language, region, and page URLs.

Runs in your browser
Hreflang Tag Generatorreciprocal set
One per line: language-or-language-REGION, full URL

Every language version should publish the same complete reciprocal set, including a self-reference. Add x-default when a neutral selector or fallback page exists.

How to use this hreflang tag generator

  1. Enter one language code and full page URL per line, including the self-reference and x-default page when needed.
  2. Review the generated options. Check syntax, escaping, and edge cases against the source before using the result in a live project.
  3. Check the output against the source, then copy or download the finished result.

About this hreflang tag generator

Hreflang Tag Generator helps you generate and validate hreflang link tags from language, region, and page URLs. The input and result appear together for easy comparison.

You can also use it to change the controls to produce a different result.

Example

Enter en-US, en-GB, es, and x-default versions of the same page to generate a reciprocal hreflang set.

Common uses

  • generate and validate hreflang link tags from language, region, and page URLs
  • change the controls to produce a different result
  • copy a useful result into the project it belongs to