Build valid hreflang links

For multilingual site teams adding local versions or fixing language mappings before a release or migration.

Assemble valid hreflang links line by line and get a consistent block that connects every language version to the right address.

How to use

  1. Write one line per language version in the input area, placing the language code first and the full page address second.
  2. Separate the code and the address with a vertical bar, as shown in the example, without adding extra text around them.
  3. Run the generation to obtain a consistent hreflang block that is ready for review before integration.
  4. Check every language-to-address pairing, then copy the block into the appropriate section of your document.

Example

With the two sample lines, the tool should produce a block containing an English version and a French version. Look at whether each language code is paired with the correct address before pasting the result into your page.

Input

en|https://example.com/en/page
fr|https://example.com/fr/page

Output

<link rel="alternate" hreflang="en" href="https://example.com/en/page">
<link rel="alternate" hreflang="fr" href="https://example.com/fr/page">

Limits and formats

Where processing happens

The block is assembled in your browser. The lines you enter, including the addresses, stay on your device and are not sent elsewhere.

Frequently asked questions

What is an hreflang block for?

It tells search engines about the language or regional versions of a page. The block helps connect each version with the address that should represent it.

Which format should I follow?

Use one entry per line, with the language code, a vertical bar and the full address. The example in the input area shows this layout.

Can I include a default version?

The tool assembles the lines you provide. If your strategy includes a default version, add the matching line with the appropriate code, then review the full block before publication.

Tools in the same category