Hreflang Tag Generator
100% PrivateSEO ToolsGenerate the hreflang link set that connects the language versions of your pages.
Runs entirely in your browser. Your input is not uploaded to Ovatly or anywhere else.
Complete at least one row with a language code and its URL.
- 1Add a row for every language or region version of the page, including the original.
- 2Use codes like en, en-GB or es-419, and the full URL of each version.
- 3Optionally set an x-default URL for visitors whose language matches nothing.
- 4Copy the link tags into every version's <head>, or use the sitemap version in your sitemap file.
Rows: en = "https://example.com/page", fr = "https://example.com/fr/page", x-default = "https://example.com/page". The output includes <link rel="alternate" hreflang="en" href="https://example.com/page">, the matching fr tag, and an x-default tag, plus a sitemap block where each <url> lists all versions as xhtml:link alternates.
- Language codes are validated against the ISO 639-1 list; region codes are format-checked (two letters, or three digits such as 419 for Latin America).
- Hreflang is reciprocal: every version must list every other version, including itself, or search engines may ignore the set.
- Hreflang targets language and region, not currency or content differences within the same language and region.
It names the fallback page for users whose language or region matches none of your versions, often a language selector page or your main English page.
About this tool
The Hreflang Tag Generator builds the link tag set that tells search engines which language and region version of a page to show each user. Enter each version's language code and URL, add an optional x-default fallback, and get both the HTML tags and the equivalent sitemap version.
Related tools
Part of Ovatly's free tools in SEO Tools.