How to use Hreflang Tag Generator
- Enter at least two language | full URL lines, or use the language picker. Each URL should represent the equivalent localized page.
- Set the optional x-default fallback in its separate box or as a row, not both. Clear the prefilled fallback box if you supply that row or do not want a fallback.
- Choose HTML head tags, XML sitemap or HTTP Link header and generate the complete set. Add reciprocal declarations, including each page’s own URL, using the selected method.
- For several page groups, enter page,language,url CSV in the bulk box instead. Bulk supports HTML or separate XML files, not HTTP headers. Check generated paths and the live implementation yourself.
Example: Hreflang Tag Generator
Generate English, French and x-default head tags for equivalent guide URLs.
Options
- Language and page URL, one per line
- Use language | full URL. Add x-default | URL here, or use the fallback box below.
- x-default fallback URL (optional)
- Optional. The page a visitor sees when no language matches, written as hreflang="x-default". Leave it empty to omit the fallback.
- Several pages as CSV (optional)
- Rows of page,language,url build one hreflang set per page. This box is used instead of the single page above, and it writes HTML head tags or one XML file per page.
Supported inputs and limits
- Single-set input allows 2–20 language-variant lines within 12,000 characters plus an optional fallback box.
- URLs are absolute HTTP(S), up to 2,000 characters, without credentials or fragments.
- Locale checks accept common language/script/region shapes and canonicalize them with the browser; this does not certify every code as Google-supported.
- Bulk CSV accepts up to 20,000 characters, 400 rows and 50 page groups;
- HTML and sitemap outputs only.
More details
No remote fetching, translation comparison or live sitemap verification.
Keep reciprocal declarations current on the actual pages.
Where your input is processed
This tool does not upload your inputs. See the limits for anything saved on your device.
Reciprocal entries matter
A search engine can ignore a language relationship when the two pages do not point back to each other. The HTML output is one complete set to place on each version. The XML output repeats that set for every listed URL. This local generator checks the lines you enter, not the live pages.
Questions about Hreflang Tag Generator
Does every page need to link to itself?
Yes. Include the full alternate set on each localized page, including the page currently being viewed.
When should I add x-default?
Add it for a language selector or other fallback page intended for visitors whose language is not one of the listed variants.
Can the URLs be on different domains?
Yes. Use full URLs for each variant and make sure the pages refer back to each other after you publish them.
Should I use HTML and a sitemap together?
One correctly maintained method is enough. Choose the method your site can keep current as pages change.