Loona Automation logoLoona Developer Tools
Home › Developer Tools › Hreflang Tag Generator

Hreflang Tag Generator - The Right Language Version for Every Visitor

In short: the Hreflang Tag Generator turns language/URL pairs into the complete set of alternate link tags - including x-default - and checks language tags and URLs before you ship them, because one wrong tag can invalidate the whole cluster.

Hreflang is unforgiving: tags must be reciprocal, URLs absolute, and codes exact. Build the set once here, then paste the identical block on every version of the page.

Private by design: everything in this tool happens 100% in your browser with JavaScript. Your input is never uploaded to a server, never stored and never seen by us - close the tab and everything is gone.

How to use the Hreflang Tag Generator

  1. List every language/region version: tag | full URL, one per line.
  2. Add the x-default URL if you have a fallback or selector page.
  3. Click Generate and read the checks.
  4. Paste the identical block into the head of EVERY version in the set - reciprocity is required.

How it works

Hreflang tells Google which language or regional version of a page to show. The rules this generator enforces come straight from Google's documentation: language values must be valid BCP 47 tags (en, en-GB, pt-BR - never EN-gb or en_UK), every URL must be fully absolute, each page in the set must link to all the others including itself, and x-default points at the fallback for unmatched languages. The checker flags malformed tags, relative URLs and duplicate language values - the three errors that most often make Google ignore a whole cluster.

Frequently Asked Questions

Is this generator free?

Yes - completely free, no sign-up.

Must every page carry the same tags?

Yes. If page A links to page B, page B must link back to page A, or Google may drop both annotations.

Language or language-region - which should I use?

Use plain language (es) when one version serves all speakers; use regions (en-GB, en-US) when content, currency or spelling genuinely differs by country.

What is x-default?

The fallback page for users whose language matches none of your versions - often a language selector or your global homepage.

Is anything uploaded?

No. Generation and checks run in your browser.

Related Developer Tools

Embed this tool on your website — free

Add this tool to your own website or blog — it is completely free, needs no sign-up, and always shows the latest version. Copy the code below and paste it into your page where you want the tool to appear. Keeping the small “Powered by Loona Automation” credit line under the embed helps keep this tool free — but you are free to style or remove it; the tool works either way.