Free SEO Tool

Hreflang Tag Generator

Build correct rel="alternate" hreflang link tags for your language and region variants in seconds. This tool runs 100% client-side in your browser — nothing is uploaded or stored anywhere.

Enter Your URLs & Language/Region Codes

Your hreflang tags will appear here.

What is this tool?

The Hreflang Tag Generator creates the <link rel="alternate" hreflang="..." href="..."> tags search engines use to work out which version of a page to show visitors based on their language and region. Getting hreflang right helps avoid duplicate content issues between language variants and makes sure the correct URL appears in search results for each locale.

How to use it:

  • Add a row for every language/region variant of a page — enter the full URL and its language code (e.g. en, en-GB, fr-CA, de).
  • Use "Add another URL" to add more rows, or the × button to remove one (at least one row always stays).
  • Optionally tick "Set one of these as x-default" and pick the URL that should be shown to visitors who don't match any of your listed languages.
  • Click "Generate Hreflang Tags" to produce the finished markup, then copy it into the <head> of every page in the group.

Remember: hreflang tags should be reciprocal — every page in the set should reference every other page (including itself), so paste the same generated block into each page's <head>.

Want an expert to do this for you?

Get a free SEO consultation and see how Edinburgh SEO can turn these quick wins into a full local search strategy.

Get Free Consultation
Get my free 24-hour audit →