Hreflang Generator
Paste the whole block into the head of every page listed above.
Row 1 needs a URL.
Drop a CSV here, or browse for one. The file stays in this browser.
The first row is language codes, for example en, en-GB, de, x-default. A blank cell skips that language for one page.
Paste a CSV or drop a file to build one sitemap for the whole site.
Drop HTML or a sitemap here. Nothing is uploaded, and no live page is fetched.
For HTML, put each page URL on its own line above that page's link tags. A sitemap can be pasted as it is.
Paste tags from several pages, or a sitemap, to check return links and codes.
Hreflang tells search engines which version of a page to show for each language or region. Build the tags for one page, or for a whole site from a CSV or a URL pattern, then download an XML sitemap or a zip of HTML snippets. Check mode reads tags or a sitemap you paste and reports missing return links, bad codes, and other problems. Every code is checked against the ISO lists Google uses, so mistakes like en-UK are caught before you publish. Everything runs in your browser, so your URLs never leave your device.
How to use
- Choose Single for one page, Bulk for many pages, or Check to audit tags you already have.
- In Single, enter a code and an absolute URL for each language, plus an optional x-default.
- In Bulk, paste a CSV with one language per column, or use a URL pattern and a list of paths.
- Copy the tags, download the XML sitemap, or download a zip of the HTML snippets.
- In Check, paste link tags or a sitemap and fix missing return links, bad codes, and anything else it lists.
Examples
- Codes en, de, and fr, with an x-default of https://example.com/, produce four link tags for a three language home page. The sitemap lists three pages because x-default shares the English URL.
- A CSV of 200 rows, with columns en, en-GB, de, and x-default, becomes one XML sitemap. Each url entry lists every language in that row, including itself.
- Pasting a sitemap where the German page does not point back to the English page reports a missing return link from the German page.
- Typing en-UK on a single page is flagged, because the region code for the United Kingdom is GB, so the tag should use en-GB.
FAQs
- What does hreflang do?
- Hreflang tells search engines which language or region version of a page to show. An English page, a German page, and a British English page can each point at the others, so the right URL is the one that ranks in the right place.
- Should I use HTML tags or a sitemap?
- Use HTML link tags when you only have a handful of pages: paste the same block into the head of every version. Use a sitemap when the site is large, because one XML file lists every page and you do not edit each head. Pick one method so the two cannot disagree. For a PDF or another file with no head, use an HTTP Link header instead.
- What does x-default mean?
- x-default is the fallback URL for visitors whose language is not one you listed. It often points at a language chooser or your global home page. It can share a URL with a real language, such as your English home page.
- Why do return links matter?
- If the English page points at the German page, the German page has to point back. Search engines may ignore the pair when the return link is missing. Each page also needs a tag that points at itself.
- Why is en-UK wrong for the United Kingdom?
- The region code for the United Kingdom is GB, so the tag should be en-GB. Google ignores en-UK. The code uk on its own is a real language code, but it means Ukrainian, not the United Kingdom.
- Is my CSV uploaded?
- No. The file is read in your browser and is not sent to a server. The sitemap and the zip are built on your device.
Supporting guides
Related tools
- Schema Markup GeneratorGenerate JSON LD schema markup for products, FAQs, articles, local businesses and more. Combine blocks, check rich result fields, copy or download.
- Meta Tag GeneratorGenerate clean HTML meta tags: title, description, canonical, and robots. Get a ready to paste block with length warnings built in.
- CSV to JSON ConverterConvert CSV to JSON and JSON to CSV in your browser. Configurable delimiter and quote, optional header row, and type inference. Nothing uploaded.
- Open Graph GeneratorGenerate Open Graph and Twitter Card meta tags from a title, description, URL, image, and type. Copy a ready to paste block in seconds.
- Meta Tag and OG Preview GeneratorGenerate title, description, Open Graph, and Twitter tags, then preview how your page looks in Google, Facebook, X, and LinkedIn.
- Keyword Density CheckerPaste text and see the most frequent words plus their density percentage. Ignore stop words and pick how many top words to show.