Hreflang Tag Generator
Paste your language codes and URLs and get a complete, consistent set of hreflang annotations — as HTML link tags, XML sitemap entries or HTTP headers. hreflang is the most error-prone tag in technical SEO, and nearly all of the errors are mechanical: an invalid code, a region used as a language, a duplicate, or a missing return link. This checks for each of those rather than only assembling the markup.
The page shown to visitors whose language matches none of the others. Leave blank to omit it.
Nothing is uploaded — this tool runs inside your browser, so your files never leave your device.
Why use this tool
- Validates every language code and flags the invalid ones
- Catches duplicate codes pointing at different URLs
- Outputs link tags, sitemap entries or HTTP headers from one list
- Adds x-default, and explains the reciprocal-link rule that catches everyone
How it works
- 1Put one language and URL per line, separated by a space — `fr https://example.com/fr/`.
- 2Add an x-default URL for visitors whose language matches none of them.
- 3Put the same complete set on every one of those pages, including a link to itself.
Hreflang Tag Generator — frequently asked questions
Almost always because they aren't reciprocal. If page A lists page B as its French alternate, page B must list page A back — and every page must include a self-referencing entry. Google discards the whole set when the return links are missing, which is why hreflang usually fails silently and completely rather than partially.
More seo tools
Looking for something else? Browse all seo tools
Explore the other tools
Same deal everywhere on the site — free, no sign-up, and no watermark on anything you download.
Or see every tool on one page.