SEO & Performance

Hreflang Generator

Enter your site URL and a URL pattern, list the locales you support, and get ready-to-paste <link rel="alternate" hreflang="…"> tags with validation for language and region codes. Everything runs in your browser — nothing is sent to a server.

Runs in your browser v1.0.0

Site & URL pattern

Your site root. Relative URLs and the default x-default value resolve against it.

Use {locale} (en-us), {lang} (en) or {region} (us). Example: /{locale}/

Locales

0 tags

Use a language (en) or language-region (fr-CA). Add a URL after the code to override the pattern for that locale (de https://example.de/). Lines starting with # are ignored.

Examples

Generated hreflang tags

live



                

How it works

Each locale produces one hreflang link by substituting the code into your URL pattern and resolving it against the base URL. Language codes are checked against ISO 639-1 and regions against ISO 3166-1, with helpful suggestions for common mistakes such as en-UK (use en-GB). Invalid or duplicate entries are reported instead of being silently emitted, and the x-default entry is placed last, as search engines expect. Paste the tags into the <head> of every localized page, or use the HTTP Link header equivalent. Nothing is uploaded.