Free hreflang Tag Generator (HTML, Header, Sitemap)
Generate hreflang tags as HTML, HTTP header or XML sitemap entries, and catch invalid language codes and missing x-default before you publish.
Enter every language version of the same page. Each version must carry the full set of tags, including a self-reference.
This tool runs entirely in your browser. Nothing you type is sent to a server.
How to use the generator
- Add one row for each language or region version of the same page.
- Choose an x-default if you have a language selector or a default version.
- Fix anything the checks flag, then pick HTML, HTTP header or sitemap output.
- Copy the output and put the same full set on every version of the page.
What it cannot do
- It does not crawl your site, so it cannot confirm that return links exist on the other pages.
- It does not check that each URL returns 200 and is indexable, which hreflang requires.
- For large sites, generate hreflang from your data or CMS rather than by hand.
Frequently asked questions
Which method should I use?
HTML tags for small sites, the XML sitemap for large ones, and HTTP headers for non-HTML files such as PDFs. Use one method consistently.
Do I need x-default?
It is recommended for a fallback or language selector page, but not required.
Why must every version list all the others?
hreflang works in pairs. If page A points to B but B does not point back, the annotation can be ignored.