Launch offer: 3-day trial for $1, then $39/mo. Cancel anytime.

Free Hreflang Tag Generator

Generate hreflang tags for multilingual and multi-regional websites. Add language/country rows, toggle x-default, and export as HTML link tags or XML sitemap format. 100% browser-based.

Output format
2 language tags + x-default

Tip: Paste the same block of HTML tags inside the <head> of every page variant. Each page must reference all language/region variants — including itself — plus x-default.

  • 100% free

    No credit card, no trial

  • No signup needed

    Use it right away, no account

  • Runs in your browser

    Your input never leaves your device

What Are Hreflang Tags?

Hreflang tags signal to Google and other search engines which language and region each version of your page targets. Without them, search engines may show the wrong language version to users or flag your pages as duplicate content.

International SEO

Ensure each user lands on the correct language version of your page, improving engagement and reducing bounce rate.

Avoid Duplicate Content

Tell Google that your French and English pages are intentional variants — not duplicate content that should be consolidated.

x-default Fallback

Set a default page for users whose language or region has no matching variant, preventing them from landing on an irrelevant locale.

Example hreflang tags<link rel="alternate" hreflang="en-us" href="https://example.com/" /> <link rel="alternate" hreflang="fr-fr" href="https://example.com/fr/" /> <link rel="alternate" hreflang="de-de" href="https://example.com/de/" /> <link rel="alternate" hreflang="x-default" href="https://example.com/" />

Paste these inside the <head> of each language variant.

How to Use the Tool

Generate correct hreflang tags in under a minute.

1

Add Languages

Click "Add Language" to add a row for each language/region variant of your page.

2

Enter URLs

For each row, enter the full URL, select a language, and optionally select a country.

3

Choose Format

Toggle between HTML link tags (for <head>) or XML sitemap format for your sitemap file.

4

Copy & Paste

Copy the generated tags and paste them into the <head> of each page variant.

Frequently Asked Questions

What are hreflang tags?

Hreflang tags are HTML attributes that tell search engines which language and regional version of a page to serve to users based on their location and browser language settings. They prevent duplicate content issues and ensure the correct version of your content appears in search results.

What is x-default?

The x-default hreflang value marks the fallback page that search engines show when no other language or region variant matches the user's settings. It's typically set to the English or universal version of a page.

Where do I put hreflang tags?

Hreflang link tags go inside the <head> section of each page. Every page in the set should include hreflang tags pointing to all variants — including itself. This self-referential requirement is important for Google to correctly process the signals.

What is the difference between HTML tags and XML sitemap format?

HTML link tags are placed in each page's <head> element. The XML sitemap format allows you to declare all hreflang relationships in a single sitemap file, which is useful for large sites. Both approaches are supported by Google.

Should I use language-only or language-country codes?

Use language-only codes (e.g. hreflang='en') when you want to target all speakers of a language globally. Use language-country codes (e.g. hreflang='en-us') when you have different content for different regions — for example, pricing in USD vs GBP.

Is this tool client-side?

Yes. All tag generation happens in your browser. No data is sent to a server.

Full SEO Automation Available

Rank Higher Without
The Manual Work

LazySEO automates keyword research, content creation, and publishing — so you dominate Google and AI search results without spending hours on SEO.

$1 today, then $39/mo. Cancel anytime.

Key terms explained

Plain-English definitions from the LazySEO SEO glossary.

HreflangHreflang is an HTML attribute (and HTTP header equivalent) used to specify the language and, optionally, the geographic region that a web page is intended for. It tells search engines which version of a multilingual or multi-regional page to serve to users based on their language preferences and location. For example, an English-US page would reference an English-UK and French-CA version, and vice versa — creating a self-referencing set of annotations.Geo-TargetingGeo-targeting in SEO refers to the practice of optimizing a website or its content to rank for searches performed in specific geographic locations. This includes using location-specific keywords, creating city or region-specific landing pages, implementing hreflang tags for international audiences, and using country-code domains or country subfolders for country-level targeting (Google Search Console's old International Targeting report was deprecated in 2022).International SEOInternational SEO is the work of making a website rank for the right audience in more than one country or language. It covers how the site is structured (country domains such as .sg or .com.au, subfolders such as /en-sg/, or subdomains), how language and regional versions are marked up with hreflang, and how content is adapted to each market rather than copied.Multilingual SEOMultilingual SEO is optimising a website that publishes content in more than one language so that each language version can be found by people searching in that language. It goes beyond translation: each language needs its own keyword research, because people in different languages search with different words, phrasings and levels of detail.
Browse the full SEO glossary