Free SEO & website tool

Hreflang Tag Generator

Format alternate-language link tags from language/URL pairs.

Result
<link rel="alternate" hreflang="en-CA" href="https://example.com/en/">
<link rel="alternate" hreflang="fr-CA" href="https://example.com/fr/">

What this tool checks

  • Format alternate-language link tags from language/URL pairs.
  • Formatting does not validate every language code, fetch alternates or ensure reciprocal/self-referencing declarations.

How to use the Hreflang Tag Generator

  1. Enter one language-code|URL pair per line and an optional x-default URL. Copy the escaped alternate link tags into the relevant page head.
  2. Formatting does not validate every language code, fetch alternates or ensure reciprocal/self-referencing declarations.
  3. The tool logic processes your entries in the browser without a tool API request. This does not describe site-wide analytics, hosting logs or other page resources.

Examples

Interpreting the result

en-CA|https://example.com/en/ and fr-CA|https://example.com/fr/ produce two alternate tags.

Frequently asked questions

Should all translations get the same set?

Review reciprocal alternate declarations on each equivalent page; generating this text does not install them.

Sources & methodology

Related tools

Related SEO & website tools