Hreflang Tag Builder

Generate hreflang tags for multilingual and multi-regional SEO. HTML and XML sitemap output. 100% client-side.

Last reviewed: April 2026

New to this tool? Click here for instructions

Languages & URLs
Output
Add language/URL pairs and click Generate to build hreflang tags.

How to Use the Hreflang Builder

The Hreflang Tag Builder is a free online tool that helps you generate hreflang tags for multilingual and multi-regional SEO. Hreflang tags are HTML attributes used in `` elements that tell search engines which language and regional version of a page to serve to users in different locales. To use the tool, follow these steps:

1. Choose a preset or start with Custom to manually add languages. Select a language, optional region, and enter the URL for that version of your page. Add x-default - designate a fallback URL for users whose language does not match any hreflang entry. Click Generate - the tool outputs HTML link tags or XML sitemap entries, ready to copy.

When to Use the Tool in Real Workflows

The Hreflang Tag Builder is ideal for website owners and SEO professionals who need to ensure that their website is correctly displaying the appropriate language version to users in different regions. It is particularly useful for businesses with a multilingual presence or those targeting multiple regions with different language preferences.

How It Works

The Hreflang Tag Builder works by allowing you to input the languages and regions you want to support, along with the corresponding URLs for each version of your website. The tool then generates the necessary hreflang tags in either HTML link tag format or XML sitemap format. The generated tags can be easily copied and pasted into your website's code to ensure that search engines serve the correct version of your page to users in different locales.

Tips, Edge Cases, or Limitations

Here are some tips and considerations when using the Hreflang Tag Builder:

1. Always include a self-referencing hreflang tag for each page to ensure that search engines know which version of your page to serve to users in their preferred language.

2. Ensure that hreflang tags are reciprocal. If page A points to page B, page B must point back to page A.

3. Use the correct language and region codes as specified by ISO 639-1 and ISO 3166-1 Alpha-2.

4. Avoid duplicate language codes to prevent conflicting signals.

5. Consider adding an x-default value to provide a fallback page for users whose language or region does not match any of the other hreflang entries.

Frequently Asked Questions

Hreflang tags are HTML attributes used in `` elements that tell search engines which language and regional version of a page to serve to users in different locales.
The x-default value designates a fallback page for users whose language or region does not match any of the other hreflang entries. This is typically set to a language selector page or the main default version of your site (usually English).
While you can use hreflang tags in both HTML and XML sitemaps, it is generally recommended to use the HTML link tag format for most websites.
If you forget the self-referencing hreflang tag, search engines may ignore the entire set of hreflang tags for your website.
No, the Hreflang Tag Builder is a client-side tool and does not send your data to a server. All processing occurs on your device.

Quick reference

Hreflang Tag Builder Quick Reference
Language Code Country Code URL hreflang Attribute
en US https://example.com/page hreflang="en-US"
en GB https://example.com/page hreflang="en-GB"
fr FR https://example.com/page hreflang="fr-FR"
es ES https://example.com/page hreflang="es-ES"
ja JP https://example.com/page hreflang="ja-JP"
pt BR https://example.com/page hreflang="pt-BR"