Hreflang Tag Generator for Multilingual Websites
Build a complete, consistent set of hreflang tags for every language version of a page. Add each language, an optional region and its URL, mark one x-default fallback, then copy ready-to-paste HTML link tags or the XML sitemap variant. Duplicate language-region pairs and relative URLs are flagged as you type. Free for SEOs and marketers running Thai-English or any multilingual site — everything runs in your browser.
Use plain "th" when the page targets all Thai speakers; add a region (th-TH) only when it targets one specific country.
Mark one row as x-default — the fallback page for visitors whose language matches none of the versions.
Some counting features may be approximate in your browser.
Please fix these issues
Place inside a <urlset> that declares xmlns:xhtml="http://www.w3.org/1999/xhtml" and repeat this <url> block for every URL listed, changing only <loc>.
Every page listed here must include this exact same set of tags (return links) — otherwise search engines ignore the whole group.
Your hreflang tags will appear here
Add at least 2 language versions with absolute URLs
How to use
- Add a row for each language version of the page and pick its language code (or enter a custom ISO 639-1 code).
- Optionally add a 2-letter region code (e.g. TH) and paste the absolute URL of that version.
- Tick x-default on the one row that should serve as the fallback for unmatched languages.
- Fix any warnings — duplicate language-region pairs and relative URLs are flagged automatically.
- Copy the HTML tag block, or switch to the XML sitemap tab for the xhtml:link version.
Features
- Two ready-to-paste outputs: HTML link tags and XML sitemap xhtml:link entries
- Common language presets (th, en, zh, ja, ko, de, fr, es) plus custom ISO 639-1 codes
- Automatic normalization — lowercase language, uppercase region (th-TH)
- Validates duplicate language-region pairs, relative URLs and enforces a single x-default
- Thai and other non-ASCII URLs are percent-encoded, with a readable form shown as a comment
- 100% in-browser — nothing is uploaded to a server