Skip to content
Rank Tactix
Technical SEO

Hreflang Tag Generator

List each language or country version of a page and get the full set of hreflang tags, including x-default, as HTML link tags or XML sitemap entries.

Built and maintained by Nouman Sabir AI search & SEO specialist Updated October 2026

  • 100% free
  • No sign-up
  • Runs in your browser, nothing is stored

Shown to visitors who match none of the versions, often a language picker or the main site.

Hreflang

<!-- Add this full set to the <head> of EVERY version listed -->
<link rel="alternate" hreflang="en-us" href="https://example.com/">
<link rel="alternate" hreflang="en-gb" href="https://example.com/uk/">
<link rel="alternate" hreflang="es-mx" href="https://example.com/mx/">
<link rel="alternate" hreflang="x-default" href="https://example.com/">

Codes and URLs look valid. Remember: every version needs the full set.

Your inputs are saved in this browser only, so they're here when you come back.

Free AI visibility check

Does ChatGPT recommend your business?

Send me your website and I'll check how you show up on Google, Maps and AI assistants, then reply with the three fixes I'd make first.

Reviewed by Nouman Sabir
Top Rated on Upwork · 100% Job Success

No spam. Your details go only to me, never to a list.

How to use the Hreflang Tag Generator

  1. 1

    Add each version of the page with its language (and optional region) code and URL.

  2. 2

    Choose an x-default page for everyone else.

  3. 3

    Add the same full set of tags to every version of the page.

What hreflang does

Hreflang tells Google which version of a page to show to which language or country, such as en-us for the United States and en-gb for the United Kingdom. It prevents the wrong version ranking and stops near-duplicate regional pages competing.

The rules that break most setups

Hreflang only works when it's complete and reciprocal:

  • Every version lists every other version, including itself
  • Use language codes (en) with optional region codes (en-us), not country alone
  • Point every URL at a live, indexable, canonical page
  • Add x-default for a language picker or global page

Frequently asked questions

Do I need hreflang for one language?

No, unless you have separate regional versions of the same language, such as US and UK English.

HTML tags or sitemap?

Either works. Sitemaps are easier to manage on large sites; HTML tags are simpler for a few pages.

What is x-default?

The version shown to visitors whose language or region doesn't match any listed version.

Is my data stored?

No. Tags are generated in your browser.

More free SEO tools

All tools →
Technical SEO

FAQ Schema Generator

Turn questions and answers into valid FAQPage JSON-LD.

Open the tool
Technical SEO

XML Sitemap Generator

Turn a list of URLs into a valid XML sitemap, ready to upload.

Open the tool
On-Page SEO

SERP Snippet Preview

See your title and meta description the way Google shows them.

Open the tool

Free 30-min strategy call

No obligation

Book now