Hreflang Validator

Paste HTML to validate hreflang annotations and check for common implementation issues.

  • Check hreflang language and region codes
  • Find duplicate values and conflicting URLs
  • Validate hreflang syntax and structure
  • Local processing only

Enter the current page URL to check if it has a self-referencing hreflang annotation.

This validation runs locally in your browser. Your HTML content is never sent to any server.

What are hreflang annotations?

Hreflang annotations are HTML link elements that indicate alternative versions of a page in different languages or regions. They help search engines serve the most appropriate version of your content to users based on their language and location preferences.

Common hreflang format

Hreflang annotations typically appear in the <head> section of your HTML:

<link rel="alternate" hreflang="en" href="https://example.com/en/page">
<link rel="alternate" hreflang="pt-BR" href="https://example.com/pt-br/pagina">
<link rel="alternate" hreflang="x-default" href="https://example.com/page">

Language and region codes

Hreflang uses standard language and region codes:

  • en - English
  • es - Spanish
  • fr - French
  • pt - Portuguese
  • pt-BR - Brazilian Portuguese
  • en-US - US English
  • x-default - Default fallback for undefined regions

Self-referencing annotations

Each page should typically include a hreflang annotation that points to itself. For example, if you're on the English version of a page, it should include an hreflang annotation with hreflang="en" that points to the same URL.

How the validator helps

The Hreflang Validator checks your HTML for common implementation issues. It identifies missing values, duplicate declarations, conflicting URLs, and other common problems that could impact your international SEO efforts. This helps ensure search engines properly understand your site's language and regional variations.

Important limitations

This validator checks the hreflang annotations present in your HTML locally in your browser. It does not fetch external URLs to verify reciprocal annotations. Reciprocal hreflang validation across pages requires inspection of those individual pages. Additionally, valid hreflang does not guarantee indexing or ranking.

FAQ

Does this tool upload my HTML content?

No. All processing happens in your browser. Your content remains private and secure.

What hreflang formats are supported?

The validator supports standard hreflang annotations in the format: <link rel="alternate" hreflang="en" href="https://example.com/en/page">. It validates language and region codes according to common standards.

Can the validator check reciprocal annotations?

No, the validator only checks the annotations present in the HTML you provide. It does not fetch or verify hreflang annotations on other pages. Reciprocal validation would require access to those external pages.

Related SEO tools