🌐 Language versions

One row per language/region version. The first row's checkbox marks it as x-default (fallback for unmatched users).

🛠 Quick start

Pre-fill common multilingual setups.

🎯 Output

Add at least one valid language row to generate tags.
Add a row and pick a language to see the output.

FAQ

What does hreflang do?

The hreflang attribute tells search engines that two or more pages are language or regional alternates of each other. When a user searches in a given language or country, the search engine can show them the matching version instead of the default page.

What each field does

Language version rows

Each row represents one language or regional version of the page. One row per version (e.g., one for English, one for Spanish, one for Mexican Spanish). The "+ Add language version" button adds more rows; the trash icon on any row removes it.

Language dropdown

The two-letter ISO 639-1 code for the page's language. Examples: en (English), es (Spanish), fr (French). Required for every row.

Region dropdown (optional)

The two-letter ISO 3166-1 alpha-2 country code if this version targets a specific region. Examples: US, GB, MX, BR. Leave blank for a general language version (e.g., generic Spanish without a country).

URL field

The absolute URL of this language version. Must include https://. Each row needs a URL for the tag to be valid.

x-default checkbox

Marks this URL as the fallback for users whose language/region doesn't match any other version. Typically your English or international landing page. Only one row should be marked x-default.

Quick-start presets

One-click templates for common multilingual setups: English (US + UK), Spanish (Spain + Mexico), and a 5-language EU set. Each preset fills in the rows with example URLs you can edit.

Output format tabs

HTML link tags = the format that goes in the <head> of every page in the group. Most common. Sitemap XML = xhtml:link entries that go inside each <url> in a sitemap. Useful for many language versions or non-HTML pages. HTTP Link header = the header format for PDFs and other non-HTML files. Only one of the three methods is used per page.

General questions

What's the format?

hreflang="LANG" or hreflang="LANG-REGION". LANG is a two-letter ISO 639-1 code (en, es, fr, de…). REGION is an optional two-letter ISO 3166-1 alpha-2 code (US, GB, MX, BR…). The special value x-default is the fallback shown when no other match is found.

Should I use reciprocal tags?

Yes. Each language version should list all the others (including itself). This tool generates a single complete set that is identical for every page in the group.

What codes are validated?

Language codes are checked against the ISO 639-1 two-letter list (197 codes). Region codes are checked against the ISO 3166-1 alpha-2 list (249 codes). Codes that look right but aren't on the list are flagged in the validation panel.

Rule of thumb: back up before replacing

If you are replacing an existing file (robots.txt, sitemap.xml, .htaccess, <head> tags, etc.), keep a copy of the original somewhere safe first.

Does this tool send my URLs to a server?

No. Everything runs in your browser. Your URLs and language picks never leave your machine.