Skip to content

Install ALink Tools

Free browser tools for images, PDFs, media, text and web checks. Most tools process files locally on your device.

  1. Tap the Share button in the Safari toolbar.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add. ALink Tools then opens from your Home Screen like an app.

Hreflang Tag Generator

Add a fully qualified URL for each language version, including x-default if you have a fallback page. This tab builds the same set of hreflang annotations as HTML tags, sitemap XML, and an HTTP Link header.

Runs in your browserRuns in your browserBCP 47HTML and sitemap
1

Input

Language versions
2

Result

How to use Hreflang Generator

  1. Add language versionsEnter an hreflang value such as en, en-GB, zh-Hans, or x-default, and the fully qualified URL for that version.
  2. Choose the output shapeReview the HTML tags, sitemap XML, and HTTP Link header. The same set of alternates is included for every URL.
  3. Copy or downloadCopy the format you need and paste it into your page head, sitemap, or response headers.

Limits and how it works

  • You can add 2 to 40 language versions in one set.
  • Language codes must be current ISO 639-1 two-letter codes. Three-letter ISO 639-2 or 639-3 codes are not accepted, because Google documents ISO 639-1 only.
  • Region codes must be officially assigned ISO 3166-1 Alpha 2 codes. Reserved codes (UK, EU, UN) and UN M.49 regions (such as 419) are rejected.
  • This tool checks codes and URL shape in your browser. It does not fetch the pages, so it cannot verify return links on the live site.

How these hreflang tags are checked

Language and region values follow BCP 47 formatting and are checked against the IANA Language Subtag Registry (file date 2026-11-18). Google's hreflang documentation requires an ISO 639-1 language code, optionally an ISO 15924 script, and optionally an officially assigned ISO 3166-1 Alpha 2 region code. The reserved value x-default is also accepted as a fallback for unmatched languages. See Google Search Central: Localized versions of your pages (https://developers.google.com/search/docs/specialty/international/localized-versions).

Tags are written in the usual BCP 47 case: lowercase language, title-case script, and uppercase region, for example en-GB and zh-Hans-US. Region-only values, reserved codes such as UK, EU, and UN, and codes outside those ISO lists, such as es-419, are rejected. Deprecated ISO 639-1 aliases such as iw are rejected in favor of the preferred code, such as he. Alternate URLs must include http:// or https://.

This is not Meta Tag Generator, which builds title, description, and social tags, and it is not XML Sitemap Generator, which builds a standard URL sitemap without xhtml:link alternates. Canonical URL Checker and the on-page SEO checker can inspect existing hreflang tags; this page generates a new set. Each language version should include itself and all other versions, as Google requires.

Frequently asked questions

Is my URL list uploaded?

No. Everything runs in your browser tab with JavaScript. Nothing you type, paste, or open is sent to a server, logged, or stored by ALink Tools.

Is this the same as XML Sitemap Generator?

No. XML Sitemap Generator turns a list of URLs into a standard sitemap.xml file with optional lastmod, changefreq, and priority. This page writes xhtml:link hreflang alternates for a set of localized versions of one page.

Is this the same as Meta Tag Generator?

No. Meta Tag Generator builds title, description, canonical, robots, Open Graph, and Twitter tags. It does not generate hreflang annotations.

Why is en-UK rejected?

Google Search ignores reserved ISO 3166-1 region codes such as UK, EU, and UN. The officially assigned code for the United Kingdom is GB, so use en-GB. The standalone tag uk is valid: it means Ukrainian, not the United Kingdom.

Related tools

All tools