Generate hreflang tags for your language versions

Enter the URL and language of each version, pick an x-default, copy the code. Runs in your browser.

Presets:

    What the generator does

    Three formats from one table

    HTML tags for the head of each page, an HTTP Link header for files like PDFs, and entries for your XML sitemap. Google accepts all three; pick one per page type.

    DACH presets

    Germany, Austria and Switzerland in one click, with or without an English version.

    Mistakes flagged as you type

    Relative URLs, a region without a language, unknown codes, “UK” instead of “GB”, duplicates and a missing x-default.

    Private

    Everything runs in your browser. Nothing you type is sent anywhere; your last entries stay in this browser only.

    Common questions

    Does every version need the same tags?

    Yes. Each version lists itself and all the others. If two pages don't point to each other, Google ignores the annotation. That is the most common hreflang error.

    Do I need a region code?

    Only if you have different versions for the same language, like German for Germany, Austria and Switzerland. A language code on its own is fine; a region code on its own is not.

    What is x-default for?

    For users whose language or region doesn't match any version, often a language picker or your main English page.

    How do I check the result on a live page?

    With the free hreflang checker: it fetches the page, follows every alternate and checks the return links.

    Running several markets?

    International setups break quietly: a missing return link, a wrong code, a canonical that points elsewhere. I check the whole setup as part of a technical audit.