Skip to content
ToolsOnDuty - free online tools
Web & SEO

Hreflang Generator

Generate alternate-language link tags from locale and URL pairs.

Free foreverRuns in your browserNo sign-up
Alternate links
<link rel="alternate" hreflang="en-US" href="https://example.com/us/page">
<link rel="alternate" hreflang="en-GB" href="https://example.com/uk/page">
<link rel="alternate" hreflang="x-default" href="https://example.com/page">

About the Hreflang Generator

Hreflang Generator turns language or locale codes and absolute URLs into copy-ready rel=alternate link elements.

Every alternate page should normally list itself and all reciprocal alternatives, with x-default where appropriate.

Key features

  • Language-region code input
  • x-default support
  • Absolute alternate URLs
  • Copy-ready HTML tags

How to use

  1. 1Enter one language code and absolute URL per line.
  2. 2Copy the generated link tags into every alternate page.
  3. 3Validate reciprocal links and canonical alignment.

Examples

Use the Hreflang Generator
Input: en-US and en-GB page URLs plus x-default
Output: Three rel=alternate link tags

Use valid ISO-style language and region codes.

Frequently asked questions

What is x-default?
It identifies a fallback page for users whose language or region does not match another alternate.
Must links be reciprocal?
Search engines generally expect each alternate to reference the others in the set.
Is my data uploaded?
No. Analysis and generation happen entirely in your browser.