Hreflang Tag Generator
Generate correct hreflang tags for your multi-language website.
Runs in your browser Your input never leaves your device.
About this tool
Hreflang tags tell search engines which language or regional version of a page to show to which audience. Enter one pair per line as a language code, a separator and the full URL. The separator can be a vertical bar or a comma. The tool outputs one link rel=alternate tag per line. Lines without both a code and a URL are ignored. It does not validate language codes or check that the URLs exist, and it does not add a self-reference for you, so include every version, also the current page. Everything runs in your browser.
How to use it
- Write one pair per line, like en | https://example.com/.
- Include every language version, plus x-default if you have a fallback.
- Copy the generated tags.
- Paste the same full set into the <head> of every listed page.
Example
en | https://example.com/ fr | https://example.com/fr/
<link rel="alternate" hreflang="en" href="https://example.com/" /> <link rel="alternate" hreflang="fr" href="https://example.com/fr/" />
Common problems
- A line produces no tag
- Each line needs both a code and a URL separated by | or a comma.
- Search engines ignore the tags
- Hreflang must be reciprocal: every page in the set must list all the others, including itself.
- A URL containing a comma breaks
- Use the vertical bar as the separator when the URL itself contains commas. With a comma separator only the first comma on the line splits the pair.