Hreflang Tag Generator
Generate correct hreflang link tags for multilingual and multi-region sites, including x-default. Prevents the most common international SEO mistakes.
This free hreflang generator builds correct rel="alternate" hreflang link tags for multilingual and multi-region websites in seconds. You add one row per language or region variant, paste each fully-qualified URL, and the tool outputs both the HTML <link> tags for your <head> and the xhtml:link form for an XML sitemap. It validates every language and region code against bundled ISO 639-1 and ISO 3166-1 lists so you do not ship the broken codes that quietly disable international targeting.
Hreflang is one of the most error-prone areas of technical SEO. The most common mistakes are missing return links (every page in a cluster must reference every other page, including itself), using country codes where a language code belongs (for example en-UK instead of en-GB), and forgetting the x-default entry that tells Google which page to serve when no language matches. The hreflang generator on this page catches those issues as you type, flags duplicate code pairs, and reminds you to include the self-referencing and x-default tags.
Everything runs in your browser - no URLs are uploaded and no account is required. When you are ready to verify how those localized pages actually rank in each market, ProMapRanker tracks your real Google and Maps positions across regions; start free.
FAQ
What format should hreflang values use?
Use a language code on its own (en, fr, de) or a language plus region code joined with a hyphen (en-US, pt-BR, es-MX). The language part is ISO 639-1 and the optional region part is ISO 3166-1 alpha-2. Codes are case-insensitive to Google, but the convention is lowercase language and uppercase region. Never use a bare country code by itself - hreflang="us" is invalid.
Do I need an x-default tag?
It is not strictly required, but it is strongly recommended. The x-default value tells search engines which URL to show users whose language or region does not match any of your specified variants - typically a global landing page or a language selector. Enable the x-default toggle in the tool and point it at that fallback URL to avoid sending mismatched users to the wrong localized page.
Where do the hreflang tags go?
You can place them in three locations, but pick one: in the HTML <head> of each page (the link-tag output here), in an XML sitemap using xhtml:link entries (the sitemap output here), or in HTTP headers for non-HTML files like PDFs. Critically, every page in the set must list the full bidirectional set including a self-referencing tag, otherwise search engines may ignore the annotations entirely.
Related tools
htaccess Redirect Generator
Generate correct 301/302 redirect rules and common rewrite snippets for your .htaccess file. Saves agencies time and errors during migrations.
Open →Robots.txt Generator
Build a valid robots.txt with allow/disallow rules, crawl-delay, AI-bot blocking, and sitemap reference. High-volume evergreen technical SEO utility.
Open →Slug Generator
Convert any title into a clean, SEO-friendly URL slug with stopword removal and custom separators. The lowest-difficulty SEO tool keyword tested.
Open →XML Sitemap Generator
Turn a pasted list of URLs into a valid XML sitemap with priority and changefreq, no crawling required. Big-volume term and useful for quick manual sitemaps.
Open →Track your real Google Maps rankings
These free tools get you set up - ProMapRanker shows where you actually rank across your whole service area on a geo-grid.
Start free - 150 credits