Hreflang Generator

Correctly generate hreflang tags for your multi-language or multi-country website!

This tool helps you generate the hreflang tag patterns to use in the different language or country versions of your pages, using the correct syntax and values according to Google's specifications. It follows the ISO 639-1 format for languages and the ISO 3166-1 Alpha 2 format for countries.

Additional Language/Region Versions

How to Use This Generator

  1. Enter your base URL in the first field (must start with https://).
  2. Select the language and region for your base URL using the ISO standard codes.
  3. Click "+ Add Another Version" to add each alternate language/region version of your page.
  4. Choose your output format:
    • HTML — Insert these tags into the <head> section of each webpage.
    • XML Sitemap — Add this to your sitemap file for centralized hreflang management.
  5. Click "Generate Hreflang Tags" to create your code.
  6. Copy the generated tags and paste them into your website code.

⭐ Pro Tip: Each page must reference itself and all its alternate language versions. This means if you have 5 language versions, all 5 pages need the same set of hreflang tags pointing to each other.

Note: Always validate your hreflang implementation using Google Search Console after deployment to catch any configuration errors.