Free SEO tool

Free Hreflang Generator

Create valid hreflang tags in seconds. Add the URL of every language or country version of a page, pick the language and country, and copy the code for your HTML, XML sitemap or HTTP headers.

1. Add the language versions of one page

One row per URL. Every version of the same page belongs in one set.

Or upload a CSV

Columns: URL, language, country (country optional). Up to 50 URLs. A header row is allowed.

2. Choose the output

International SEO

Correct tags are only half the job

Hreflang still breaks when canonicals point elsewhere, alternates redirect or return links are missing on some templates. In an International SEO review I check hreflang, canonicals and language targeting across your whole site.

How to use this hreflang generator

  1. 1

    Collect the versions

    List every URL that shows the same content for a different language or country, for example your English, Dutch and German services page.

  2. 2

    Pick language and country

    Choose the language for each URL. Add a country only when you target a specific market, such as en-GB versus en-US.

  3. 3

    Add x-default

    Point x-default to the version for everyone else, usually your main version or a language selector.

  4. 4

    Implement on every version

    Every URL in the set needs the same hreflang annotations, including a reference to itself. Then test the result with the hreflang checker.

Related guide

How to Do International SEO in 2026: A Step-by-Step Guide

Read the guide →

FAQ

What does an hreflang tag look like?

An hreflang tag is a link element in the head of a page, for example <link rel="alternate" hreflang="en-GB" href="https://www.example.com/uk/" />. It tells search engines that this URL is the version for English speakers in the United Kingdom.

Should I use HTML tags, an XML sitemap or HTTP headers?

Use one method. HTML tags are the most common for small and medium websites. An XML sitemap is easier to maintain on large sites, because you don't have to change page templates. HTTP headers are mainly for non-HTML files such as PDFs.

Do I need a country code in hreflang?

No. A language code on its own, such as nl or de, is valid. Add a country only when you have different versions for the same language, for example en-US and en-GB.

What is x-default?

x-default tells search engines which URL to show to users whose language or country does not match any of your versions. It is usually your main version or a language selector page.

Why is en-UK not in the list?

Because it is not a valid code. Hreflang uses ISO 3166-1 country codes, and the code for the United Kingdom is GB. That makes en-GB correct and en-UK one of the most common hreflang mistakes.

Book a Free SEO Call