§
§ · free tool

Hreflang checker. Locale matrix.

Paste your page HTML. Extracts every rel=alternate hreflang declaration, validates ISO 639-1 language + ISO 3166-1 region codes, checks for x-default, and lists missing reciprocal tags from sibling locales.

Paste your page HTML. The right panel extracts every <link rel="alternate" hreflang="..."> tag, validates each language + region code against ISO 639-1 and ISO 3166-1, checks for the required x-default, and lists the locale matrix.

Paste the full <head> contents or the entire HTML — only <link rel="alternate" hreflang> tags are parsed.

locale matrix · live

              
    Sources used by this checker

    Privacy: HTML parsed in-browser only.

    § 02 · questions

    Six questions users ask.

    What's the format for hreflang?

    ISO 639-1 language code optionally followed by ISO 3166-1 Alpha-2 region. Examples: en, en-US, es-MX, fr-CA. The reserved x-default points at the fallback. Wrong: en-USA (alpha-3 not allowed), en-UK (UK isn't valid — use GB).

    Do I need x-default?

    Strongly recommended. x-default tells Google which URL to serve when no locale matches the user's locale. Without it, Google picks one of the locale-tagged URLs essentially at random.

    What's reciprocity?

    Every locale in your hreflang set must list every other locale, including itself. Missing reciprocity is the #1 hreflang bug — the locale that's missing the back-link gets demoted in Google's eligibility evaluation.

    Should hreflang go in HTML or HTTP headers?

    HTML link tags are easiest. HTTP Link headers work for PDFs. XML sitemap annotations are better for hundreds of locales. Pick one method and stick with it.

    Is en-UK valid?

    No. UK is not a valid ISO 3166-1 country code — use GB (United Kingdom of Great Britain and Northern Ireland).

    Does this tool log my HTML?

    No. The form runs entirely in JavaScript on your device. Nothing is sent to Digital Heroes servers.