Hreflang Generator

Build correct hreflang tags for every language and region version of your pages. Copy them as HTML link tags, XML sitemap entries, or an HTTP header. Free and fully in your browser.

Your language and region versions One row per version. Region is optional. Each URL must be absolute (start with https://).

How to use the hreflang generator

1

Add a Version for Each Language

Enter the language code, an optional region code, and the full URL for that page. Add one row for every language or region you target.

2

Add an x-default

Turn on x-default and point it at the page you want shown to visitors whose language you do not target, usually your main or English version.

3

Copy the Tags

Pick HTML link tags, XML sitemap, or HTTP header, then copy the output into your page head, your sitemap, or your server config.

Pixellize free online tools illustration showing browser, file, and gear icons

Get International SEO Signals Right the First Time

When the same content exists in more than one language, or for more than one country, search engines need a clear signal about which version belongs to which audience. Without it, the wrong page can rank in the wrong market, or your own versions can compete against each other.

Hreflang annotations solve this. They map each URL to a language and an optional region, and they tell search engines to treat the set as one piece of content with several local versions. Get the codes and the reciprocal links right, and the correct page shows up for each searcher.

This generator builds that set for you in the format you need, and flags the mistakes that quietly break international targeting, like duplicate pairs, relative URLs, or a missing self-reference.

Why Use Our Hreflang Generator?

Three Output Formats

Get the same set as HTML link tags, XML sitemap entries, or an HTTP Link header for non-HTML files like PDFs.

Built-in Validation

Catches the common mistakes: invalid codes, duplicate language and region pairs, relative URLs, and a missing x-default.

Language and Region Targeting

Target a language on its own, or a language in a specific country, using standard codes with type-ahead suggestions.

x-default Support

Add an x-default fallback in one click so search engines know which version to show everyone else.

Unlimited Versions

Add as many language and region rows as your site needs. There is no cap and no signup.

Private by Design

Everything runs in your browser. Your URLs are never uploaded, logged, or stored on a server.

Frequently Asked Questions

Common questions about hreflang tags and international SEO.

What is an hreflang tag?
An hreflang tag tells search engines which language and region a page targets, so the right version shows for the right searcher. You add one annotation per version, and each page lists the full set.
Where do I put the hreflang tags?
HTML link tags go in the head of each page. XML sitemap entries go in your sitemap. The HTTP header version is for non-HTML files such as PDFs. Pick whichever fits, you do not need all three.
Do I need an x-default?
It is optional but recommended. The x-default tells search engines which page to show users whose language or region you do not specifically target.
Does every page need to link back to itself?
Yes. Each page must include a self-referencing hreflang tag for its own URL, plus tags for every other version. This generator includes the self-reference for you.
What is the difference between language and region codes?
The language code, like en or de, is required and uses two letters. The region code, like US or GB, is optional, uses two letters, and narrows the target to one country.
Is this hreflang generator free?
Yes, it is completely free with no signup and no limits. It runs entirely in your browser, so your data stays on your device.
Scroll to Top