EN
My tools

Hreflang Tag Generator

Make hreflang tags for every language and country version of a page — HTML link tags, an HTTP Link header or sitemap entries — with code checks and an x-default.

Language from ISO 639-1 (en, ko, ja…), optionally a script (zh-Hant) and a country from ISO 3166-1 (US, GB, KR…).
The page for visitors whose language is not listed — often a language picker.
HTML tags
Tags
6
including x-default
Versions
5
x-default
https://example.com/

No plain "ko" version: ko speakers outside ko-KR are matched to x-default. Consider adding ko | URL for them.

Put the same block in the <head> of every version listed — each page must list itself and all the others, or Google may ignore the annotations.

What each code means
hreflangLanguage — countryURL
en-USEnglish — United Stateshttps://example.com/en-us/
en-GBEnglish — United Kingdomhttps://example.com/en-gb/
enEnglishhttps://example.com/en/
ko-KRKorean — South Koreahttps://example.com/ko/
jaJapanesehttps://example.com/ja/
x-defaulteveryone elsehttps://example.com/
My tools →
Advertisement

Hreflang annotations tell Google which page to show to speakers of which language and country, so a visitor in the UK sees your en-GB page and a visitor in Korea the ko-KR one. This generator writes the full set for every version of a page — HTML link tags, an HTTP Link header for PDFs and other files, or XML sitemap entries — and checks the codes as it goes. It catches the usual mistakes: en-UK instead of en-GB, jp instead of ja, country codes on their own, EU or 419, relative URLs, the same code used twice, and a missing x-default.

How to use this tool

  1. List each version on its own line as code | URL, for example en-GB | https://example.com/uk/.
  2. Add an x-default URL for everyone else, such as a language picker.
  3. Choose the output: HTML tags, HTTP header or sitemap entries.
  4. Copy the result into every version of the page (the same block each time), or into your sitemap.

Formula

<link rel="alternate" hreflang="language[-Script][-REGION]" href="absolute URL" /> — one per version, plus hreflang="x-default"

The language is an ISO 639-1 code (en, ko, ja), the optional script an ISO 15924 code (Hans, Hant, Latn) and the optional region an ISO 3166-1 alpha-2 country code (US, GB, KR). The region never stands alone: "be" means Belarusian, not Belgium. Case does not matter to Google. Codes and names are checked against your browser's built-in locale data (Intl.DisplayNames), so no code list is sent with this page.

Example

For en-US at https://example.com/en/, ko-KR at https://example.com/ko/ and an x-default of https://example.com/, the generator writes three tags, e.g. <link rel="alternate" hreflang="en-US" href="https://example.com/en/" />. Typing en-uk stops with an error and suggests en-GB, because UK is not the ISO code for the United Kingdom — Google ignores it.

Frequently asked questions

Does every page need all the tags?

Yes. Each version must list itself and every other version. If page A points to page B but B does not point back, Google may ignore the pair. Paste the same block on every version.

Should I use HTML tags, the HTTP header or the sitemap?

Google treats them the same; pick one. HTML tags are simplest for pages, the HTTP header is the only option for PDFs and other non-HTML files, and the sitemap is easiest for large sites with many versions.

Is x-default required?

No, but it is recommended. It names the page for visitors whose language or country is not listed — typically a language selector or your international homepage.

Sources

Last updated:

Cite or embed this tool
APA

kakaoCalc. (2026, November 8). Hreflang Tag Generator. https://kakao.mobile/tools/hreflang-tag-generator/

MLA

“Hreflang Tag Generator.” kakaoCalc, 8 Nov. 2026, kakao.mobile/tools/hreflang-tag-generator/.

Paste this code into your page. The widget runs in your visitors' browsers, shows no ads and keeps a link back to this page. Embedding terms

Advertisement