Tool

hreflang codes: look up a value, or test the ones you have

Pick a language and a region to get the value in the format Google's doc asks for. Or paste your tags and see which ones break it. It runs in your browser, and nothing you type leaves the page.

Updated

Look up a code

en-GB: English, for users in United Kingdom

Your hreflang value

en-GB

English, for users in United Kingdom

<link rel="alternate" hreflang="en-GB" href="https://example.com/" />

Check a set you already have

The format Google documents

Everything in this section is from Google Search Central, Tell Google about localized versions of your page, read on 8 November 2026.

"The first code of the hreflang attribute is the language code (in ISO 639-1 format) followed by an optional second code that represents the region code (in ISO 3166-1 Alpha 2 format)."

Google Search Central
  • The language comes first, always. "You can't specify the country code by itself." The doc's own example is Belgium: be is Belarusian, so Dutch for Belgium is nl-BE.
  • Codes outside those two lists are not supported. The doc names es-419, the UN number for Latin America.
  • Reserved region codes do nothing. "Using EU, UN, or UK in hreflang annotations doesn't have an effect on Google Search." The assigned code for the United Kingdom is GB.
  • A script can go between the two, in ISO 15924 format: zh-Hant, or zh-Hans-US for Simplified Chinese in the United States.
  • x-default is the reserved value for visitors whose language you have not listed.
  • Case does not matter to Google. en-GB in that case is the ISO convention.

What the checker says about common values

Example values and what the checker says
ValueResult
en-UKUK is a reserved code. The United Kingdom is GB, so en-GB.
usA region alone. The first code has to be a language.
es-419A UN area number. Google names this one as unsupported.
en_USCodes are joined with a hyphen, not with _. So en-US.
iwWithdrawn from ISO 639-1. Hebrew is he now.
filA three-letter code. Google supports two-letter ISO 639-1 codes only.
en-gbValid. Google accepts any case, and en-GB is the ISO convention.

It reads the hreflang attribute out of link elements, an HTTP Link header or sitemap xhtml:link lines. Plain values work too, one per line or separated by commas. It also tells you when a set lists the same value twice or has no x-default.

What it does not test

Only the codes. Google's doc also asks for return links: if page X lists page Y, page Y has to list page X. Each version lists every version, itself included, with a fully qualified URL. This tool fetches nothing, so it can't see your pages or their links.

To see what a crawler gets from one of your pages, the instant audit fetches it from our server and reads the raw HTML.

Where the lists come from

The tool ships the lists with the page, retrieved on 2026-11-08. Our script that refreshes them is site/scripts/hreflang-data.ts.