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.
"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
Value
Result
en-UK
UK is a reserved code. The United Kingdom is GB, so en-GB.
us
A region alone. The first code has to be a language.
es-419
A UN area number. Google names this one as unsupported.
en_US
Codes are joined with a hyphen, not with _. So en-US.
iw
Withdrawn from ISO 639-1. Hebrew is he now.
fil
A three-letter code. Google supports two-letter ISO 639-1 codes only.
en-gb
Valid. 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.
249 ISO 3166-1 alpha-2 region codes, from the IANA language subtag registry (file date 2026-09-17), without the reserved and private-use codes it also lists. We compared them with the UN M49 table. Every code matched, and TW is the one M49 leaves out. The same registry gives the withdrawn codes and what replaced them.
Accept allows Google Analytics, Microsoft Clarity and PostHog, including session recording. Reject stops their recording. Cookieless counts and server request logs stay on. What we measure