Generate hreflang link tags for multilingual and multi-regional sites — enter your default URL and alternate language URLs to get ready-to-paste HTML. Updates live in your browser.
Format: language code or locale, then a pipe, then the full URL. Example: en-gb|https://example.com/uk/page
Frequently Asked Questions
What is an hreflang tag?
An hreflang tag tells search engines which language or regional version of a page to show users. It uses a link element with rel=”alternate” and an hreflang attribute in your page head.
What is x-default used for?
The x-default hreflang points to the fallback page when no language or region matches the user’s settings. It is recommended for international sites with a default landing page.
Where do I place hreflang tags?
Add the generated link tags inside the head section of each page version. Every alternate version should reference all other versions, including itself.
Can I use region codes like en-us?
Yes. Use ISO 639-1 language codes (en, de, fr) or language-region codes (en-us, en-gb, de-at) for more specific targeting.
Is this tool free and does it work on mobile?
Yes on both counts. The Hreflang Tag Generator on draft21 is completely free with no sign-up required and works on all devices.
Related Tools
Meta Robots Tag GeneratorBuild meta robots directives for index and follow control.
Sitemap ValidatorValidate XML sitemap structure and URL entries.
SEO Slug CleanerClean and optimize URL slugs for search engines.
SEO & Website ToolsBrowse all SEO and website tools on draft21.
Robots.txt GeneratorBuild robots.txt with allow and disallow rules.