Skip to content

Hreflang Tag Generator

Generate hreflang link tags to tell search engines which language and regional version of a page to show to different users.

Category: online
Use Case: Multilingual Website SEO, Regional Content Targeting, International Launch Checklist
Privacy: 100% browser-based
Language CodePage URL

Recommended Settings

Pro Tips

  • Use ISO 639-1 language codes (like en, es, fr) or add a region with a hyphen (like en-US, en-GB, pt-BR) for more specific targeting
  • Every page in a set of hreflang tags should also reference itself - each language version should link to all the others, including itself
  • x-default marks the fallback version shown to users whose language doesn't match any of your specified alternates
  • Place these tags in the <head> of every language version of the page, not just one central page

Most Popular

Most multilingual sites include their primary language plus a small set of translated versions and an x-default fallback

When to Use This Tool

Multilingual Website SEO

Help search engines correctly serve the right language version of your content to users.

Regional Content Targeting

Direct search engines to show region-specific pages (like en-US vs en-GB) to the appropriate audience.

International Launch Checklist

Set up proper hreflang tags as part of launching localized versions of a website.

Fixing Duplicate Content Issues

Use hreflang tags to clarify that similar pages in different languages aren't unintentional duplicate content.

How It Works

1

Take each language and its corresponding page URL

2

Generate a <link rel="alternate" hreflang="..."> tag for each language and URL pair

3

Optionally add an x-default tag pointing to a fallback version for unmatched languages

100% Private

Files never leave your device. All processing happens locally in your browser.

Lightning Fast

Powered by Client-side HTML generation for optimal performance on modern browsers.

Open Source

Built with verified, open-source libraries. Fully transparent.

Frequently Asked Questions

Do I need to include the page's own language in the list?

Yes. Best practice is for each page to include hreflang tags for all language versions, including a self-referencing tag pointing to itself in its own language.

What's the difference between "en" and "en-US"?

"en" targets English speakers generally, regardless of region. "en-US" specifically targets English speakers in the United States, letting you serve different content to, say, en-US versus en-GB audiences.

What does x-default mean?

It designates a fallback page to show to users whose language or region doesn't match any of your other specified hreflang values - commonly a language selector page or your primary/default language version.

Is my data sent to a server?

No. The tags are generated entirely locally in your browser using JavaScript. Nothing you enter is transmitted anywhere.

Can I use hreflang tags in a sitemap instead of the page head?

Yes, hreflang annotations can also be included in an XML sitemap as an alternative to placing them in each page's HTML head - both approaches are supported by major search engines.