Instant, in your browserFree, no sign-up

Hreflang Tag Generator

Enter your language and URL pairs, then copy hreflang code as HTML, sitemap or an HTTP header.

rabbitclip · Tool

When the same content exists in several languages or regions, hreflang tags tell Google which URL belongs to which language, so the wrong language version doesn't get shown to the wrong reader. This tool takes a URL for each language and produces the same mapping as an HTML link tag, a sitemap XML entry, or an HTTP Link header.

Every page needs a self-referencing line in its own hreflang set, one that points back to itself; leaving it out usually invalidates the whole set. An x-default line names the fallback page shown when nothing matches the visitor's language, and most sites need one. Once generated, the code just gets pasted into the page head, the sitemap file, or the server configuration.

The most common mistake is a one way link: page A points to page B with hreflang, but B never points back to A, and Google tends to ignore mismatched pairs like that. A close second is getting the language code wrong; standard codes such as en for English or en-GB for British English should be used rather than an invented abbreviation.

How to use it

  1. Enter the page URL for each language.
  2. Add a region code alongside the language where it matters, such as en-GB.
  3. Set the x-default page.
  4. Choose HTML, sitemap or HTTP header format and copy the code.
  5. Check that every page links back to every other one.

FAQ

Does hreflang directly boost rankings?

No, it isn't a ranking signal. It makes sure the right language and region version reaches the right visitor, which improves the experience and, indirectly, performance.

Is x-default required?

It isn't strictly required but it's recommended; it tells Google which version to fall back to when nothing matches the visitor's language.

Why does the reciprocal link matter?

If page A points to B but B doesn't point back to A, Google can disregard the whole mapping; every page needs to link back to the others.

Are the URLs I enter sent to a server?

No. The code is generated entirely in your browser; the URLs are never stored anywhere.

Share

Related articles

Other tools

If you don’t know where to start, that’s fine; you’re in the right place.

Your project might already be clear in your head, or still just an idea. Either works. On a short call we talk through where you are and where you could go, together.

Let’s set up a call
Let’s talk about your project