Validate

Hreflang Tag Validator

Paste a page’s HTML and, optionally, its URL. The validator reads every <link rel="alternate" hreflang> tag as data, checks the language-region codes and URLs, and flags duplicates and misplaced tags. It cannot fetch the other pages, so it cannot confirm that they link back.

Back

1. HTML source

Treated as text

2. Report

Nothing fetched
Paste HTML and press Validate.

This tool cannot fetch pages, so it cannot verify reciprocal hreflang links, status codes or canonicals on the alternate URLs.

About this tool

About Hreflang Tag Validator

Hreflang Tag Validator checks the <link rel="alternate" hreflang> tags in pasted HTML. It validates language codes against ISO 639-1 and regions against ISO 3166-1 or UN M.49, catches underscores, duplicates and repeated x-default values, flags missing or relative URLs and tags in the body, and finds the self-referencing entry when you supply the page URL.

Hreflang errors are easy to make and hard to spot, and a single bad code or duplicate can cause search engines to ignore a set of annotations. Validating each page’s tags catches the problems you can fix in the source.

How to use

Step by step

  1. Paste the HTML source of one language version of a page.
  2. Optionally enter that page’s URL.
  3. Press Validate.
  4. Review the entries table and the errors, warnings and notes.
  5. Repeat for each language version, then copy or download the report.
Key features

What it offers

  • ISO 639-1 language and ISO 3166-1 region code checks
  • Script subtags (zh-Hant) and UN M.49 regions (es-419)
  • Underscore, malformed and region-only code detection
  • Duplicate entries and multiple x-default detection
  • Relative URL resolution and self-reference check
  • Clear note that reciprocal links cannot be verified locally
Best practices

Tips for best results

  • Use hyphens, not underscores: en-GB, not en_GB.
  • List every language version on every version, including itself.
  • Use absolute https:// URLs that point to canonical pages.
  • Add x-default for a language selector or global fallback page.
Benefits

Why people use it

Code-accurate

Real ISO code lists, not just patterns.

Clear

Each entry gets a status.

Honest

States what cannot be checked locally.

Private

Nothing is fetched.

FAQ

Common questions

A two-letter ISO 639-1 language code, optionally followed by a four-letter script and a region — either a two-letter ISO 3166-1 code or a three-digit UN M.49 code. Examples: en, en-US, zh-Hant-TW, es-419. The special value x-default is also valid.
hreflang uses a hyphen, not an underscore. en_US is a locale format used by some software; write it as en-US.
UK is not an ISO 3166-1 region code. The United Kingdom’s code is GB, so use en-GB.
The same hreflang value appearing more than once. If the copies point to different URLs it is an error, because each language or region must map to one URL. More than one x-default is also an error.
No. Hreflang annotations should be reciprocal, but checking that needs the other pages. This tool never fetches anything, so it only validates the page you paste. Repeat the check on each language version.
An hreflang entry that points to the page itself. Each language version should list itself as well as the alternates. Enter the page URL to check for it.
Yes. Relative URLs are flagged as warnings. If you enter the page URL, the tool resolves them locally so you can see the full address.
Private by design

This runs entirely in your browser

No file or text you enter here is uploaded. Encoding and decoding happen on your device using native browser APIs — close the tab and nothing remains on a server.

Install Toolisco Add it to your device for offline, one-tap access.