Free SEO tool · Technical · multilingual

Hreflang tag generator: correct tags for multilingual sites

Build the hreflang tag set for your site’s language versions — HTML, HTTP header or sitemap — and catch common mistakes before you publish. Runs locally in your browser.

3 output formatsCSV batch mode → sitemap100% local, no account
Hreflang tag generator
Language versions
Checks

    When you need hreflang

    The hreflang attribute tells search engines which version of a page to show each user, based on language and, optionally, country. Use it when you have the same content in several languages (for example English and Romanian) or regional variants of the same language (en-GB and en-US). Without it, Google may show the wrong version or treat versions as duplicates. The full guide, including recommended structures, is in our article on hreflang and multilingual SEO.

    How to use the tool

    1. Add one row per version: the language code (with optional region) and the absolute URL of the page in that language.
    2. Add an x-default row for users whose language you don’t cover.
    3. Pick the format: HTML tags for the <head>, an HTTP header for non-HTML files, or XML sitemap entries.
    4. Put the same set of tags on every version, including the page itself (self-reference). Reciprocity is one of the most commonly broken rules.
    5. For many pages, use the “Batch (CSV)” tab: one column per language, one row per page, and the result is a complete sitemap.

    Common mistakes the tool flags

    • “UK” instead of “GB” for the United Kingdom, and country codes used as languages (“us”, “gb”).
    • Underscore instead of hyphen (“en_GB”), wrong capitalization or legacy codes (“iw”, “in”).
    • Relative, http://, parameterized or fragment URLs. Use absolute, canonical addresses.
    • Missing self-reference and reciprocity: if page A points to B, B must point back to A.
    • Canonical contradicting hreflang: each version canonicalizes to itself, not to another language.
    • Mixed methods: choose HTML, header or sitemap — not all three with different values.

    What a browser-based tool can’t do

    It can’t verify reciprocity on your live site, because browsers can’t read other domains’ pages. For that, use a crawler that validates hreflang across all versions (Google has retired the old International Targeting report in Search Console). Also read why some pages aren’t indexed and how canonical relates to duplicate content.

    If you run a multilingual site and aren’t sure about your setup, an SEO audit or a technical SEO session checks exactly these details. You can continue with the schema markup generator for inLanguage and translation relationships.

    Frequently asked questions

    Hreflang: frequently asked questions

    When do I need hreflang?

    When you have the same content in several languages or regional variants of one language. If you have one language and one country, you don’t need it.

    Do I have to add hreflang to every version?

    Yes. Each version must contain the full set of tags, including self-reference, and the versions must reference each other.

    What is x-default?

    A value for users whose language or region isn’t covered. It usually points to a language selector or the international version, often the English one.

    Can I use “en” instead of “en-GB” or “en-US”?

    Yes. “en” covers all English speakers. Use regional variants only if you have different content for those countries.

    Does the tool check my live site?

    No. It runs in your browser and can’t read other domains. Use a crawler that validates hreflang to verify reciprocity on the live site.

    Want a specialist to look at the results?

    Tools show you the symptoms. We find the causes and fix them: send us your website address and get a free initial analysis.