# Hreflang tag generator and checker

> Free hreflang generator: list each language version of a page, catch bad codes and duplicates, and copy link tags or sitemap entries.

Source: https://netweft.com/tools/hreflang-generator

List every language version of a page and get the hreflang annotations for all of them, checked for the mistakes that make Google ignore the set.

Runs in your browser. Nothing you type is sent anywhere.

## How to use it

1. Add one row per language version: its code and its full URL.
2. Add an x-default row if one version should catch everyone else.
3. Fix anything the checker flags, then copy the link tags or the sitemap entries.

## What hreflang tells Google

hreflang marks pages that are the same content in different languages or for different regions, so Google shows a searcher the version in their language. Each version lists every version, itself included, and the set must match on every page in it.

A code is an ISO 639-1 language, such as en, optionally followed by an ISO 3166-1 region, such as en-GB. The region on its own is not a valid code, and the United Kingdom is GB, not UK.

## What the checker catches

The tool flags a code that is not a language, the UK mistake, a URL that is not absolute, and a code listed twice. It also notes a missing x-default, which is optional and names the page for visitors no other code matches.

## Questions

**Do I need both link tags and sitemap entries?**

No. Put them in the head of each page or in the sitemap; one method is enough, and the sitemap is easier to keep consistent on a large site.

**Does a page list itself?**

Yes. Every version lists all the versions, including itself, which is why the tool writes the same set for each page.

**Is anything I type sent anywhere?**

No. It runs in this page. Nothing you type is sent to netweft or anywhere else.

## Related tools

- [Schema markup generator](https://netweft.com/tools/schema-markup-generator): Fill in a form and get JSON-LD for an organization, an article, a product or a breadcrumb trail.
- [SEO page checker](https://netweft.com/tools/seo-page-checker): Check one page against the single-page rules of netweft's site audit: title, description, headings, content and indexing.
- [Robots.txt tester](https://netweft.com/tools/robots-txt-tester): Test whether a robots.txt allows a crawler to fetch a path, and see the rule that decided.

netweft tracks each market separately: a project has its own country and language, so rankings are read where your customers search. [See how](https://netweft.com/docs/projects-and-markets).
