Hreflang Tag Generator
Create hreflang tags for every language version of a page.
- 100% Free
- No Sign Up
- Works in Your Browser
Hreflang tag generator
Create hreflang link tags for language versions
More SEO Tools
View all tools- Robots.txt generatorCreate a robots.txt file, including AI crawler rules
- Robots.txt testerCheck whether a URL is allowed for a crawler
- Sitemap generatorTurn a list of URLs into sitemap.xml
- Sitemap validatorCheck sitemap.xml for errors and bad URLs
- Redirect generatorCreate 301 redirect rules for your server
- SEO auditCheck a live page's SEO in one report
- SERP previewSee how a page could look in Google results
- Meta tag generatorCreate title, description and robots meta tags
- Schema markup generatorCreate JSON-LD structured data for common types
Every everyday SEO tool, right in your browser.
No installs. No uploads. No signup.
Browse all 29 tools- SEO tools
- 29
- Reference guides
- 7
- Inputs stored or logged
- 0
How to use the hreflang tag generator
Three steps, all in your browser.
- 1
Start from your page
Have the page's title, URL and key details to hand.
- 2
Set the rules
Add rules or URLs. The result updates instantly.
- 3
Copy the result
Copy what you need in one click. Nothing is saved or sent anywhere.
Hreflang Tag Generator: what to know
hreflang tells search engines that several pages are versions of the same content for different languages or regions, so each searcher can be shown the right one. The hreflang tag generator takes your list of versions, a language code (and optional region) with a URL for each, and writes the annotations as link rel="alternate" hreflang tags for the HTML head, xhtml:link entries for an XML sitemap or HTTP Link headers, including x-default for visitors who match none of them. It checks the codes as you go and catches common mistakes such as en-UK instead of en-GB.
Values are an ISO 639-1 language code, optionally followed by an ISO 3166-1 alpha-2 region code: en, en-GB, de-CH, es-MX. Google also supports script codes such as zh-Hans and zh-Hant, but not UN M.49 region codes such as 419. The hardest rule is reciprocity: every version must list every other version and itself, or Google may ignore the annotations, which is why the same block of tags goes on every page in the set.
hreflang doesn't make pages rank higher, and Google can still show another version if it judges it a better match. It's most useful when versions are similar, such as English for the US and the UK, or when you want searchers sent to the right country site. Each URL should be absolute, canonical and return 200.
Popular uses
- Launching a site in a new language or country
- Separating US, UK and Australian English pages
- Adding an x-default language picker page
- Fixing hreflang errors reported in an audit
Tips for the best result
- Paste the same block of tags on every version of the page.
- Use one method per set of pages: HTML tags, HTTP headers or the sitemap.
- Point each URL at the canonical version, never at a redirect.
Read how JustYourSEO works and our privacy details. Text, HTML and images you use here are processed in your browser and are never sent to our server.