NitroSERP

Free Hreflang Tag Generator

Runs locally

Updated October 25, 2026

Free hreflang tag generator: create <link rel="alternate" hreflang="..."> HTML annotations and x-default fallback tags for multilingual and multi-regional SEO.

<link rel="alternate" hreflang="en-US" href="https://example.com/page" />
<link rel="alternate" hreflang="es-ES" href="https://example.com/es/page" />
<link rel="alternate" hreflang="x-default" href="https://example.com/page" />

How to use Hreflang Tag Generator

Enter each localized URL alongside its ISO 639-1 language code (en, es, de) and optional ISO 3166-1 Alpha-2 region code (en-US, en-GB).

Include an x-default fallback URL for visitors whose browser language does not match a specific locale.

Copy the complete <link rel="alternate" hreflang="..."> cluster and paste the identical block into the <head> of every URL in the language group.

Generate reciprocal hreflang tags for multilingual & multi-region websites

When your website serves translated pages (such as English, Spanish, and German) or regional variants in the same language (such as US Dollars on /us/ and British Pounds on /uk/), hreflang tags ensure Google swaps the right regional URL into local search results. Use this free hreflang tag generator to build a complete, reciprocal <link rel="alternate" hreflang="..."> cluster with x-default.

Common hreflang ISO 639-1 & ISO 3166-1 code examples

Target AudienceCorrect hreflang ValueCode BreakdownCommon Error to Avoid
English (Global / Any Country)enISO 639-1 language onlyAdding a country code when targeting all English speakers
English (United States)en-USen (English) + US (United States)Using underscore (en_US) instead of hyphen (en-US)
English (United Kingdom)en-GBen (English) + GB (Great Britain)Writing en-UK (UK is invalid in ISO 3166-1)
Spanish (Mexico vs Spain)es-MX / es-ESes (Spanish) + MX or ESUsing country code mx alone without a language prefix
Unmatched Language Fallbackx-defaultReserved fallback tokenOmitting x-default on global sites

Copy-and-paste reciprocal hreflang HTML example

Place this exact same block inside the <head> of the US page, the UK page, and the German page so every URL self-references and reciprocates:

<link rel="alternate" hreflang="en-US" href="https://www.example.com/us/pricing" />
<link rel="alternate" hreflang="en-GB" href="https://www.example.com/uk/pricing" />
<link rel="alternate" hreflang="de-DE" href="https://www.example.com/de/preise" />
<link rel="alternate" hreflang="x-default" href="https://www.example.com/us/pricing" />

Related international & technical SEO resources

Verify that every localized URL has a self-referencing canonical tag with the canonical URL generator, include localized URLs in your XML sitemap generator, and read our step-by-step guide on how to use hreflang tags without breaking SEO.

Hreflang Tag Generator FAQs

Hreflang tags (<link rel="alternate" hreflang="lang-region" href="https://..." />) tell Google which language and regional version of a page to show searchers in different countries, preventing the wrong country's currency or language from appearing in local search results.

More seo analysis tools and nearby utilities.

  • Meta Tag Generator

    Free SEO meta tag generator: create HTML title tags, meta descriptions, robots directives, and Open Graph tags with live character counters and copy-and-paste head code.

    Open tool →
  • llms.txt Generator

    Generate a spec-compliant /llms.txt markdown file for your website root so AI assistants like ChatGPT, Claude, and Perplexity can find and cite your canonical pages.

    Open tool →
  • Next.js Metadata Generator

    Generate copy-and-paste TypeScript Metadata and generateMetadata() code for the Next.js App Router (app/page.tsx and app/layout.tsx) with Open Graph, Twitter cards, and canonicals.

    Open tool →
  • GSC Regex Generator

    Build RE2-compliant custom regular expressions for Google Search Console (GSC) to filter question queries, long-tail keywords by word count, commercial intent, and URL directories.

    Open tool →
View all seo analysis tools

Step-by-step articles that use this tool.