ToolBirch

Hreflang Generator

Generate rel=alternate hreflang link tags.Web & SEO Tools

Hreflang Generator

Generate rel=alternate hreflang links. One line per language: lang-code | URL (optionally add x-default as the last line).

Example: en | https://example.com/ and de | https://example.com/de/, plus x-default | https://example.com/

About this tool

Language and URL pairs become hreflang link tags, including the x-default entry that tells search engines which URL serves everyone else.

How to use the Hreflang Generator tool

  1. List the pairs. lang and URL on each line.
  2. Generate. Escaped link tags, one per pair.
  3. Paste into the head. On every page in the set, reciprocally.

Supported formats

Input

  • Plain text or file input

Output

  • Converted or analysed output

Inputs are validated before anything is processed. Invalid values and unsupported files are rejected with a clear error instead of failing silently.

Frequently asked questions

What is x-default?

The fallback for users whose language matches none of the set — usually your homepage default.

Do the tags need to be reciprocal?

Yes; each page should reference all others in its set, including itself.

Do I need both XML and HTML tags?

One is enough; pick the place you already control.

Privacy

Everything you enter stays in this browser tab. There is no upload endpoint for tool inputs, no account, and no server-side copy of your text or files. Results are produced locally and disappear when you close the page.

No account is required and no file is ever uploaded. See the privacy policy for details about analytics and the limited data this site stores.

Known limitations

  • No region subtag validation; the codes are emitted as written.

Other free tools from the same collection.