Hreflang Generator
This free hreflang generator creates hreflang tags for multilingual and multi-country sites as HTML, an XML sitemap or an HTTP header. It warns you about repeated language codes, incomplete addresses and a missing x-default.
Hreflang Generator is built by SEOLOG and offered free for you to use.
- Completely free
- No sign-up
- What you enter stays in your browser
What does the hreflang generator do?
The hreflang tag tells search engines about the different language or country versions of the same page. It lets Google show the Turkish version to someone searching in Turkish and the German version to someone searching in German. A tag that is set up wrongly is ignored; the hreflang generator prepares the code in the correct form.
In this free hreflang tag generator you enter the language, the country if you wish and the page address for each language version. The tool writes the language code (tr, en) and the language-country code (en-GB, de-AT) in the correct form, adds the x-default line and gives the output in three formats: HTML head, XML sitemap and HTTP header. It warns you about mistakes such as the same code used for two versions or an incomplete address.
This online hreflang builder runs in your browser: the addresses you enter are not sent to our servers or stored. It is free and unlimited; add as many language versions as you like.
How to use the hreflang generator
- Enter the first version. In the "Version 1" card choose the language and type the full page address, with https://. If the version targets a particular country, choose the country too; if not, leave it as "No country (all countries)".
- Add the other languages. Fill in the second card; press "Add a language version" for more. Each version needs its own address.
- Choose the default version. Select "Default version (x-default)" on the version that visitors who match no language should see.
- Choose the output format. Press "HTML head", "XML sitemap" or "HTTP header". HTML head is enough for most sites.
- Add the code. Take the code with "Copy" or "Download" in the "Hreflang tags" box and add the same lines to every page in the list.
Frequently asked questions
If your answer is not here, write to us.
Is the hreflang generator free?
Yes. The SEOLOG hreflang generator is completely free and asks for no account or email. There is no usage limit; create tags for as many pages and languages as you need.
When do I need hreflang tags?
You need them when the same content exists in more than one language, or when you serve the same language to different countries on separate pages: en-GB for the United Kingdom and en-US for the United States, for example. A site in one language aimed at one country does not need hreflang.
What is x-default for?
x-default names the page to show visitors whose language or country matches none of the versions in your list. It is usually the main language of the site or a language selection page. It is not required but it is recommended, and the tool reminds you when none is selected.
Do hreflang tags have to be reciprocal?
Yes. If the Turkish page points to the English page, the English page must point back to the Turkish one; tags without a return link may be ignored. Each page must list itself as well. That is why you need to add the full set of lines the tool produces to every page in the list.
Should I choose HTML head, XML sitemap or HTTP header?
HTML head is the easiest route for most sites. With many languages and pages, moving the tags to the XML sitemap keeps the page code lighter. The HTTP header is for non-HTML files such as PDFs. All three do the same job; pick one and apply it consistently.
Similar free tools
All SEO Tools- SEO Tools Meta Tag Generator Generate title, description, Open Graph and X card tags from one form. Open tool
- SEO Tools Robots.txt Generator & Tester Choose which pages Google and AI bots may crawl, then download the file. Open tool
- SEO Tools Schema (JSON-LD) Generator Get JSON-LD for FAQ, product, article and local business by filling in a form. Open tool
- SEO Tools SEO-Friendly URL Slug Generator Turn a headline into a short, clean URL without special characters. Open tool
Let us look at your whole site together
Tools fix pages one at a time. Leave your address and our free preliminary analysis will list the SEO work your site needs first.