# Free Hreflang Tag Generator

> Hreflang tag generator. List each language or region version, pick an x-default, and copy the full set as HTML tags, sitemap entries or a Link header.

Canonical: https://abacklaunch.com/tools/hreflang-tag-generator
Last updated: 2026-11-19

Build the full hreflang set for a page in several languages or regions, with x-default, as HTML tags, sitemap entries or an HTTP header.

This is an interactive tool. Use it at https://abacklaunch.com/tools/hreflang-tag-generator (it runs in your browser; nothing is uploaded).

## How to use it

1. **List every version**: One row per language or region: the full URL, a language code and an optional region.
2. **Pick an x-default**: The page for everyone else, often a language picker or your main version.
3. **Copy one format**: HTML tags for every page, sitemap entries, or an HTTP header for files like PDFs.

## How hreflang works

Hreflang tells Google which version of a page to show to which language or region. Each version lists every version, including itself. If page A names page B, page B must name page A too, or Google may ignore the tags.

A code is a language in ISO 639-1 format, like en or de, plus an optional region in ISO 3166-1 alpha-2 format, like GB or MX. A region alone is not allowed, because Google does not work out the language from a country. The United Kingdom is GB, so the code is en-GB, never en-UK.

## What x-default does

x-default names the page to show when no listed language matches the visitor's browser. It is optional, but Google recommends it. Point it at a language picker, or at the version you want everyone else to see.

## HTML tags, sitemap or header

You can declare the same set in three places: link tags in the head of each page, xhtml:link entries in your XML sitemap, or an HTTP Link header. Google treats them the same, so one is enough. The header is for files without HTML, such as PDFs. The sitemap keeps page templates clean on large sites.

## Questions

### Is it en-UK or en-GB?

en-GB. The region is an ISO 3166-1 country code, and the United Kingdom's code is GB.

### Does each page need to list itself?

Yes. Every version carries the full set, its own URL included. That is why the generator gives one set to paste on every page.

### Can I use relative URLs?

No. Google requires fully qualified URLs, including https://.

### Can two codes point to the same URL?

Yes. One page can serve en-GB and en-IE, for example. But one code can point to only one URL.

## Related

- [Hreflang checker](https://abacklaunch.com/tools/hreflang-checker)
- [Canonical tag generator](https://abacklaunch.com/tools/canonical-tag-generator)
- [XML sitemap generator](https://abacklaunch.com/tools/sitemap-generator)
- [Meta tag generator](https://abacklaunch.com/tools/meta-tag-generator)
- [Free SEO tools](https://abacklaunch.com/tools/category/seo)
