Free tool · no signup · runs in your browser
Hreflang generator
Generate hreflang tags for a locale cluster: one alternate link per locale, each pointing at an absolute URL, plus an x-default fallback. Nothing is uploaded or fetched.
Already have tags? Run the free hreflang checker to verify self-reference and reciprocity across every page.
What it generates
One alternate link per locale plus x-default. Locale codes use the language or language-region form (en, en-US, de-DE), and every href is an absolute http(s) URL.
<link rel="alternate" hreflang="en-US" href="https://example.com/" /> <link rel="alternate" hreflang="de-DE" href="https://example.com/de/" /> <link rel="alternate" hreflang="x-default" href="https://example.com/" />
How to use it
- Add one row per locale, including the current page's own locale.
- Paste the tags into the
<head>of every page in the cluster. - Run the free hreflang checker to confirm reciprocity across all pages.
Frequently asked questions
What is an hreflang generator?
It turns your locale-to-URL mapping into the <link rel="alternate" hreflang="…"> tags search engines use to serve the right language or region.
Do I need x-default?
Google treats it as recommended, not required. This generator adds it by default and falls back to the first locale URL when you leave the field empty.
Why must every locale include a self-reference?
Each page in the cluster should point at itself as well as its peers. A missing self-reference breaks the cluster and is a common cause of hreflang being ignored.
Is it free?
Yes — the generator and the hreflang checker are both free, with no account.
How do I generate hreflang tags?
Add one row per locale as locale | absolute URL, including the page’s own locale as a self-reference, then generate. Paste the same set into the head of every page in the cluster and run the hreflang checker to confirm that each page links back to the others.
Which locale codes should I use?
The language-only form (en) or the language-region form (en-US, de-DE). The generator rejects lines whose code does not match that shape, but it does not check the code against a registry — use the code your page actually declares in its lang attribute.
Can I generate tags for many locales at once?
Yes. Paste one line per locale; the output is one alternate link per row plus x-default. Every page in the cluster must carry the same set of links, so generate once and reuse the block rather than building it per page.