SEO TOOLS · NOTHING IS FETCHED

hreflang Generator and Checker

Build hreflang tags for a multilingual site and check codes, absolute URLs, and x-default.

Input

Result

<link rel="alternate" hreflang="zh-TW" href="https://example.com/zh-TW/page" />
<link rel="alternate" hreflang="en" href="https://example.com/en/page" />
<link rel="alternate" hreflang="ja" href="https://example.com/ja/page" />
<link rel="alternate" hreflang="x-default" href="https://example.com/en/page" />

Findings

No problems found.

About this tool

Enter a language code and URL per locale to get the complete hreflang set including x-default. The tool checks the three mistakes that break hreflang most often: a code that does not match the BCP 47 shape (writing `zh-tw` instead of `zh-TW`, or using a non-existent code like `cn`), a relative URL where an absolute one is required (relative paths make the whole set be ignored), and duplicate codes. It also notes whether the chosen x-default has a matching entry.

How it works

  1. Add a row per locale with its language code and absolute URL.
  2. Choose which language serves as x-default.
  3. Review the findings and paste the tags into every locale's head.

Limits and notes

Language codes are checked against the BCP 47 shape, not the full registry. Reciprocal linking between pages cannot be verified from here.

Privacy

Pasted HTML, URLs, and text are analysed inside this browser only. Nothing is uploaded, stored, or written to the URL or any log.

Frequently asked questions

Why does hreflang so often do nothing?
Three usual causes: relative URLs where absolute ones including https:// are required; malformed codes, since the region part of `zh-TW` must be uppercase and `cn` is not a language code; and missing reciprocity — if A points at B, B must point back at A or the whole set is ignored. The first two are checked here; the third requires the complete tag set on every locale's page.
Is x-default required?
Not required, but recommended. It tells search engines which version to show when neither the user's language nor region matches any entry, usually a language selector or the English version. Without it, the engine guesses.