ISO 639-1
two lettersnames languages
en, de, zh
The one hreflang expects. About 180 languages, which covers every language a commercial site is likely to publish in.
Three ISO standards answer three different questions. The same codes drive both the lang attribute on every page you publish and the hreflang annotations on a translated one, and using the wrong code is the most common reason either is silently ignored [5]. This page covers which standard applies where, what a valid value looks like, the lookalikes that fail without warning, and the full list of all 184 language and 259 region codes.
A language code and a country code are different things from different lists. An hreflang value is built from both, language first [5].
names languages
en, de, zh
The one hreflang expects. About 180 languages, which covers every language a commercial site is likely to publish in.
names languages
eng, deu, cmn
Far wider coverage, including languages with no two-letter code. Valid in HTML lang, but use the two-letter form where one exists.
names countries and regions
GB, US, BR
The region half of an hreflang value. Always a country or territory, never a language and never a continent.
Full lists live with the registries that maintain them [1][2] rather than in a copy here, because they are revised and a stale mirror is worse than no mirror.
The language is required and the region is optional. A region on its own is never valid, and the two halves come from different standards [3].
hreflang="en" → language only, valid
hreflang="en-gb" → language + region, valid
hreflang="gb" → region only, INVALID
hreflang="x-default" → the fallback, valid
Codes are case-insensitive, so en-GB and en-gb are the same value. A hyphen separates the halves; an underscore (en_GB) is a programming locale convention and is not valid here [3].
Every one of these parses as a string and fails as an annotation. The first is the expensive one: it sends British visitors a Ukrainian page.
hreflang="uk"Ukrainian — a language codehreflang="en-gb"for the United Kingdomhreflang="en-UK"UK is not an ISO 3166 codehreflang="en-gb"GB ishreflang="gb"a region alone is not validhreflang="en-gb"language first, alwayshreflang="cz"Czechia is the country codehreflang="cs"Czech is the languagehreflang="jp"Japan is the country codehreflang="ja"Japanese is the languagehreflang="en-EU"the EU is not a countryhreflang="en"or list each marketlangHreflang is the reason most people look these codes up, but the lang attribute uses the same two lists and applies to every page, multilingual or not. It is what tells a screen reader how to pronounce the text and a browser whether to offer a translation [6].
<html lang="en">
Declares the language of the document. Required for WCAG 2.2 success criterion 3.1.1, and the single most common accessibility failure in an otherwise careful build [7].
<p lang="fr">…</p>
Any run of text in another language gets its own annotation, which is criterion 3.1.2. Without it a screen reader pronounces French with English phonetics [6].
<a hreflang="de">
On a link, hreflang describes what is at the other end. lang describes the element it sits on. Different questions [8].
<html>, and on any element whose language differs.<link rel="alternate"> in the head, or in the sitemap.en is usually right.A template that ships <html lang="en"> on every page of a translated site. The German page then declares itself English, so it is read aloud in English phonetics and offered for translation into the language it is already in. The hreflang annotations can be perfect and this will still be wrong, because they answer different questions [7].
All 184 two-letter codes currently in the registry. These are the values the language half of an hreflang may take; anything not on this list is either a three-letter 639-2 code, a region code, or not a language at all.
aaAfarabAbkhazianaeAvestanafAfrikaansakAkanamAmharicanAragonesearArabicasAssameseavAvaricayAymaraazAzerbaijanibaBashkirbeBelarusianbgBulgarianbiBislamabmBambarabnBengaliboTibetanbrBretonbsBosniancaCatalanceChechenchChamorrocoCorsicancrCreecsCzechcuChurch SlaviccvChuvashcyWelshdaDanishdeGermandvDhivehidzDzongkhaeeEweelModern Greek (1453-)enEnglisheoEsperantoesSpanishetEstonianeuBasquefaPersianffFulahfiFinnishfjFijianfoFaroesefrFrenchfyWestern FrisiangaIrishgdScottish GaelicglGaliciangnGuaraniguGujaratigvManxhaHausaheHebrewhiHindihoHiri MotuhrCroatianhtHaitianhuHungarianhyArmenianhzHereroiaInterlingua (IALA)idIndonesianieInterlingueigIgboiiSichuan YiikInupiaqioIdoisIcelandicitItalianiuInuktitutjaJapanesejvJavanesekaGeorgiankgKongokiKikuyukjKuanyamakkKazakhklKalaallisutkmKhmerknKannadakoKoreankrKanuriksKashmirikuKurdishkvKomikwCornishkyKirghizlaLatinlbLuxembourgishlgGandaliLimburganlnLingalaloLaoltLithuanianluLuba-KatangalvLatvianmgMalagasymhMarshallesemiMaorimkMacedonianmlMalayalammnMongolianmrMarathimsMalay (macrolanguage)mtMaltesemyBurmesenaNaurunbNorwegian BokmålndNorth NdebeleneNepali (macrolanguage)ngNdonganlDutchnnNorwegian NynorsknoNorwegiannrSouth NdebelenvNavajonyChichewaocOccitan (post 1500)ojOjibwaomOromoorOriya (macrolanguage)osIron OsseticpaPanjabipiPaliplPolishpsPushtoptPortuguesequQuechuarmRomanshrnRundiroRomanianruRussianrwKinyarwandasaSanskritscSardiniansdSindhiseNorthern SamisgSangoshSerbo-CroatiansiSinhalaskSlovakslSloveniansmSamoansnShonasoSomalisqAlbaniansrSerbianssSwatistSouthern SothosuSundanesesvSwedishswSwahili (macrolanguage)taTamilteTelugutgTajikthThaitiTigrinyatkTurkmentlTagalogtnTswanatoTonga (Tonga Islands)trTurkishtsTsongattTatartwTwityTahitianugUighurukUkrainianurUrduuzUzbekveVendaviVietnamesevoVolapükwaWalloonwoWolofxhXhosayiYiddishyoYorubazaZhuangzhChinesezuZuluAll 259 codes, countries and territories alike. One of these may follow a language code, never precede it and never stand alone. The reserved private-use ranges are excluded because they name no place.
ACAscension IslandADAndorraAEUnited Arab EmiratesAFAfghanistanAGAntigua and BarbudaAIAnguillaALAlbaniaAMArmeniaAOAngolaAQAntarcticaARArgentinaASAmerican SamoaATAustriaAUAustraliaAWArubaAXÅland IslandsAZAzerbaijanBABosnia and HerzegovinaBBBarbadosBDBangladeshBEBelgiumBFBurkina FasoBGBulgariaBHBahrainBIBurundiBJBeninBLSaint BarthélemyBMBermudaBNBrunei DarussalamBOBoliviaBQBonaire, Sint Eustatius and SabaBRBrazilBSBahamasBTBhutanBVBouvet IslandBWBotswanaBYBelarusBZBelizeCACanadaCCCocos (Keeling) IslandsCDThe Democratic Republic of the CongoCFCentral African RepublicCGCongoCHSwitzerlandCICôte d'IvoireCKCook IslandsCLChileCMCameroonCNChinaCOColombiaCPClipperton IslandCQSarkCRCosta RicaCUCubaCVCabo VerdeCWCuraçaoCXChristmas IslandCYCyprusCZCzechiaDEGermanyDGDiego GarciaDJDjiboutiDKDenmarkDMDominicaDODominican RepublicDZAlgeriaEACeuta, MelillaECEcuadorEEEstoniaEGEgyptEHWestern SaharaEREritreaESSpainETEthiopiaEUEuropean UnionEZEurozoneFIFinlandFJFijiFKFalkland Islands (Malvinas)FMFederated States of MicronesiaFOFaroe IslandsFRFranceGAGabonGBUnited KingdomGDGrenadaGEGeorgiaGFFrench GuianaGGGuernseyGHGhanaGIGibraltarGLGreenlandGMGambiaGNGuineaGPGuadeloupeGQEquatorial GuineaGRGreeceGSSouth Georgia and the South Sandwich IslandsGTGuatemalaGUGuamGWGuinea-BissauGYGuyanaHKHong KongHMHeard Island and McDonald IslandsHNHondurasHRCroatiaHTHaitiHUHungaryICCanary IslandsIDIndonesiaIEIrelandILIsraelIMIsle of ManINIndiaIOBritish Indian Ocean TerritoryIQIraqIRIslamic Republic of IranISIcelandITItalyJEJerseyJMJamaicaJOJordanJPJapanKEKenyaKGKyrgyzstanKHCambodiaKIKiribatiKMComorosKNSaint Kitts and NevisKPDemocratic People's Republic of KoreaKRRepublic of KoreaKWKuwaitKYCayman IslandsKZKazakhstanLALao People's Democratic RepublicLBLebanonLCSaint LuciaLILiechtensteinLKSri LankaLRLiberiaLSLesothoLTLithuaniaLULuxembourgLVLatviaLYLibyaMAMoroccoMCMonacoMDMoldovaMEMontenegroMFSaint Martin (French part)MGMadagascarMHMarshall IslandsMKNorth MacedoniaMLMaliMMMyanmarMNMongoliaMOMacaoMPNorthern Mariana IslandsMQMartiniqueMRMauritaniaMSMontserratMTMaltaMUMauritiusMVMaldivesMWMalawiMXMexicoMYMalaysiaMZMozambiqueNANamibiaNCNew CaledoniaNENigerNFNorfolk IslandNGNigeriaNINicaraguaNLNetherlandsNONorwayNPNepalNRNaoeroNUNiueNZNew ZealandOMOmanPAPanamaPEPeruPFFrench PolynesiaPGPapua New GuineaPHPhilippinesPKPakistanPLPolandPMSaint Pierre and MiquelonPNPitcairnPRPuerto RicoPSState of PalestinePTPortugalPWPalauPYParaguayQAQatarRERéunionRORomaniaRSSerbiaRURussian FederationRWRwandaSASaudi ArabiaSBSolomon IslandsSCSeychellesSDSudanSESwedenSGSingaporeSHSaint Helena, Ascension and Tristan da CunhaSISloveniaSJSvalbard and Jan MayenSKSlovakiaSLSierra LeoneSMSan MarinoSNSenegalSOSomaliaSRSurinameSSSouth SudanSTSao Tome and PrincipeSVEl SalvadorSXSint Maarten (Dutch part)SYSyrian Arab RepublicSZEswatiniTATristan da CunhaTCTurks and Caicos IslandsTDChadTFFrench Southern TerritoriesTGTogoTHThailandTJTajikistanTKTokelauTLTimor-LesteTMTurkmenistanTNTunisiaTOTongaTRTürkiyeTTTrinidad and TobagoTVTuvaluTWTaiwan, Province of ChinaTZUnited Republic of TanzaniaUAUkraineUGUgandaUMUnited States Minor Outlying IslandsUNUnited NationsUSUnited StatesUYUruguayUZUzbekistanVAHoly See (Vatican City State)VCSaint Vincent and the GrenadinesVEVenezuelaVGBritish Virgin IslandsVIU.S. Virgin IslandsVNViet NamVUVanuatuWFWallis and FutunaWSSamoaYEYemenYTMayotteZASouth AfricaZMZambiaZWZimbabweBoth lists generated from the IANA Language Subtag Registry [2], file dated 17 September 2026. The registry is revised as languages and territories change, so check the source before relying on an unusual code.