In short
To generate hreflang tags, enter one language code and URL per line (for example en https://example.com/ and fr https://example.com/fr/), and copy the <link> tags into the <head> of every version. Add x-default for your fallback page.
How to use the Hreflang Tag Generator
- 1Paste or type your input in the left box (or click "Try an example").
- 2Adjust the options if needed. The result updates as you type.
- 3Copy the result or download it as a file.
Rules that trip people up
Every language version must list all versions, including itself, and the annotations must be reciprocal. Codes use ISO 639-1 languages with optional ISO 3166 regions, like en-gb; "uk" means Ukrainian, not the United Kingdom.
Frequently asked questions
Can I use a sitemap instead?
Yes, hreflang can be declared in HTML, HTTP headers or the XML sitemap. Pick one method.
What does x-default do?
It marks the page for users whose language doesn't match any version, often a language selector or the English site.
Is my data sent anywhere?
No. Everything runs in your browser. What you paste is never uploaded, logged or stored, so it's safe for code, tokens and private content.
Last updated

