SEO
hreflang tag generator
Map each language/region to its URL — get validated hreflang tags in three formats.
For the HTML and HTTP-header forms, the same set must appear on every listed page (each page references all versions, including itself). Script subtags (e.g. zh-Hans-CN) aren't validated.
About the output formats
- HTML tags —
<link rel="alternate">elements for the<head>of every HTML page in the set. - XML sitemap —
<url>entries with<xhtml:link>alternates for an XML sitemap. Lets you declare hreflang without editing each page's<head>; the usual choice for large sites. - HTTP header —
Link:response headers. The only way to declare hreflang for non-HTML files such as PDFs, where there is no<head>to hold tags.
Return tags & consistency
hreflang only works when the annotations are reciprocal: every page in the set references all the others and itself. Because this tool emits one shared block for the whole set, that's handled automatically — as long as you put the block on every listed page. What it can't fix for you is an inconsistent set, so it flags the two mistakes that make Google drop the cluster: a single language pointing to two different URLs (a conflict), and one URL claimed by two different languages. An x-default sharing a URL with its language version (e.g. en and x-default both on the English page) is expected and isn't flagged.
Browse language & region codes
A quick reference — type any of these into a code field. For the complete, authoritative lists, see the sources at the bottom of the page.
Common languages (ISO 639-1)
arArabicbgBulgariancsCzechdaDanishdeGermanelGreekenEnglishesSpanishfaPersianfiFinnishfrFrenchheHebrewhiHindihuHungarianidIndonesianitItalianjaJapanesekoKoreannlDutchnoNorwegianplPolishptPortugueseroRomanianruRussianskSlovaksvSwedishthThaitrTurkishukUkrainianviVietnamesezhChinese
Africa (ISO 3166-1)
AOAngolaBFBurkina FasoBIBurundiBJBeninBWBotswanaCDCongo - KinshasaCFCentral African RepublicCGCongo - BrazzavilleCICôte d’IvoireCMCameroonCVCape VerdeDJDjiboutiDZAlgeriaEGEgyptEHWestern SaharaEREritreaETEthiopiaGAGabonGHGhanaGMGambiaGNGuineaGQEquatorial GuineaGWGuinea-BissauKEKenyaKMComorosLRLiberiaLSLesothoLYLibyaMAMoroccoMGMadagascarMLMaliMRMauritaniaMUMauritiusMWMalawiMZMozambiqueNANamibiaNENigerNGNigeriaRERéunionRWRwandaSCSeychellesSDSudanSHSt. HelenaSLSierra LeoneSNSenegalSOSomaliaSSSouth SudanSTSão Tomé & PríncipeSZEswatiniTDChadTGTogoTNTunisiaTZTanzaniaUGUgandaYTMayotteZASouth AfricaZMZambiaZWZimbabwe
Asia (ISO 3166-1)
AEUnited Arab EmiratesAFAfghanistanAMArmeniaAZAzerbaijanBDBangladeshBHBahrainBNBruneiBTBhutanCNChinaCYCyprusGEGeorgiaHKHong Kong SAR ChinaIDIndonesiaILIsraelINIndiaIOBritish Indian Ocean TerritoryIQIraqIRIranJOJordanJPJapanKGKyrgyzstanKHCambodiaKPNorth KoreaKRSouth KoreaKWKuwaitKZKazakhstanLALaosLBLebanonLKSri LankaMMMyanmar (Burma)MNMongoliaMOMacao SAR ChinaMVMaldivesMYMalaysiaNPNepalOMOmanPHPhilippinesPKPakistanPSPalestinian TerritoriesQAQatarSASaudi ArabiaSGSingaporeSYSyriaTHThailandTJTajikistanTLTimor-LesteTMTurkmenistanTRTürkiyeTWTaiwanUZUzbekistanVNVietnamYEYemen
Europe (ISO 3166-1)
ADAndorraALAlbaniaATAustriaAXÅland IslandsBABosnia & HerzegovinaBEBelgiumBGBulgariaBYBelarusCHSwitzerlandCQSarkCZCzechiaDEGermanyDKDenmarkEEEstoniaESSpainFIFinlandFOFaroe IslandsFRFranceGBUnited KingdomGGGuernseyGIGibraltarGRGreeceHRCroatiaHUHungaryIEIrelandIMIsle of ManISIcelandITItalyJEJerseyLILiechtensteinLTLithuaniaLULuxembourgLVLatviaMCMonacoMDMoldovaMEMontenegroMKNorth MacedoniaMTMaltaNLNetherlandsNONorwayPLPolandPTPortugalRORomaniaRSSerbiaRURussiaSESwedenSISloveniaSJSvalbard & Jan MayenSKSlovakiaSMSan MarinoUAUkraineVAVatican CityXKKosovo
North America (ISO 3166-1)
AGAntigua & BarbudaAIAnguillaAWArubaBBBarbadosBLSt. BarthélemyBMBermudaBQCaribbean NetherlandsBSBahamasBZBelizeCACanadaCRCosta RicaCUCubaCWCuraçaoDMDominicaDODominican RepublicGDGrenadaGLGreenlandGPGuadeloupeGTGuatemalaHNHondurasHTHaitiJMJamaicaKNSt. Kitts & NevisKYCayman IslandsLCSt. LuciaMFSt. MartinMQMartiniqueMSMontserratMXMexicoNINicaraguaPAPanamaPMSt. Pierre & MiquelonPRPuerto RicoSVEl SalvadorSXSint MaartenTCTurks & Caicos IslandsTTTrinidad & TobagoUSUnited StatesVCSt. Vincent & GrenadinesVGBritish Virgin IslandsVIU.S. Virgin Islands
South America (ISO 3166-1)
ARArgentinaBOBoliviaBRBrazilCLChileCOColombiaECEcuadorFKFalkland IslandsGFFrench GuianaGYGuyanaPEPeruPYParaguaySRSurinameUYUruguayVEVenezuela
Oceania (ISO 3166-1)
ASAmerican SamoaAUAustraliaCCCocos (Keeling) IslandsCKCook IslandsCXChristmas IslandFJFijiFMMicronesiaGUGuamKIKiribatiMHMarshall IslandsMPNorthern Mariana IslandsNCNew CaledoniaNFNorfolk IslandNRNauruNUNiueNZNew ZealandPFFrench PolynesiaPGPapua New GuineaPNPitcairn IslandsPWPalauSBSolomon IslandsTKTokelauTOTongaTVTuvaluUMU.S. Outlying IslandsVUVanuatuWFWallis & FutunaWSSamoa
Antarctica (ISO 3166-1)
AQAntarcticaBVBouvet IslandGSSouth Georgia & South Sandwich IslandsHMHeard & McDonald IslandsTFFrench Southern Territories
Sources & references
- Localized versions of your pages (hreflang)Google Search Central
- List of ISO 639 language codesWikipedia
- ISO 3166-1 alpha-2 country codesWikipedia