Hreflang Tag Generator

Enter URLs per language and generate hreflang link tags.

100% in your browser — nothing uploaded

Generate hreflang link tags for multilingual pages

Use 2-letter ISO codes (en, es, fr) or with region (en-US, pt-BR)

The x-default tag tells search engines which URL to show when no language matches


About this hreflang tag generator

Enter the URL for each language version of your page — English, Spanish, French, or any other — and the tool generates the complete set of hreflang link tags you need in your HTML head. The x-default tag is included automatically, telling search engines which version to show when no language matches the user.

Hreflang tags are how you tell Google and other search engines that the same content exists in multiple languages or for different regions. Without them, search engines may index only one version, show the wrong language to users, or flag the translations as duplicate content — all of which hurt rankings.

The generator validates language codes against the BCP 47 standard (ISO 639 two-letter codes with optional region subtags: en, es, en-US, pt-BR, zh-Hans) and checks that URLs are properly formatted. It catches common mistakes like duplicate language codes and missing https. The output is ready to paste directly into your HTML head section.

You can add as many language versions as you need. Each page in a multilingual site must include hreflang tags pointing to ALL versions (including itself) — this tool handles that automatically. Everything runs in your browser; no URLs are fetched or stored.

FAQ

What is the x-default tag?

The x-default hreflang tag tells search engines which version of the page to show when the user's language doesn't match any of your language versions. It's typically set to the English or primary-language page.

What language codes should I use?

Use ISO 639-1 two-letter codes (en, es, fr, de) optionally with an ISO 3166-1 region subtag (en-US, pt-BR, zh-Hans). Google recommends the shorter form unless you need to distinguish regions.

Are my URLs sent anywhere?

No. Tag generation runs entirely in your browser. No URLs are fetched, stored, or shared.

Related tools