List your language versions once and get the HTML tags, HTTP header and XML sitemap markup, already checked for the usual mistakes.
HTML, header and sitemap outputCode validationx-default supportReciprocal set check
About this tool
Hreflang tells Google which version of a page belongs to which language or region, so a visitor in Germany sees your German page and not the English one. It is easy to get wrong: the codes are strict, every page must list the whole set including itself, and every link has to be returned by the page it points to.
Enter one line per version with its code and URL. The generator writes the same set in the three formats Google supports, flags invalid codes such as en-UK or underscores, finds duplicates, mixed http and https, relative URLs and missing x-default, and shows the full set in a table so you can read it before you publish.
Why use this tool
Three formats
Copy HTML tags for the head, a Link header for non-HTML files, or sitemap entries for large sites.
Strict code check
Catches en-UK, iw, in, jp and other codes that look right but are not valid hreflang values.
URL consistency
Warns about mixed protocols, parameters, relative addresses and a URL used for two languages.
How it works
Enter each version as a language code followed by its full URL, one per line.
Choose whether to add x-default and how regions should be written.
Copy the format you need and add it to every page in the set.
Frequently asked questions
Where does the hreflang code go?
You can use link tags in the head of each page, an HTTP Link header, or an XML sitemap. Pick one method per set. Whichever you choose, every version must list all versions, including itself.
What is x-default?
It marks the page to show when no listed language fits the visitor, often a language selector or your main English page. It is recommended but optional.
Is en-UK valid?
No. The region for the United Kingdom is GB, so the code is en-GB. Google can still use the language part of a wrong code in some cases, but you should not rely on that.
Do language and country both need to be set?
No. Use a language alone (de) when one page serves every German speaker. Add a country (de-AT) only when you have a separate page for that country. A country code on its own is not valid.
Why does Google say my hreflang has no return tags?
Because page A points to page B, but page B does not point back to A. Hreflang works only when the links are reciprocal, so paste the complete set on every version.
Is my data uploaded anywhere?
No. This tool runs entirely in your browser. What you type or paste is processed on your device and is not sent to our servers.
More free tools
User Reviews
–
No ratings yet
Write a review
What users are saying
💬
No reviews yet
Be the first to share your experience with this tool — your feedback helps others.