Free localization developer tool

Free hreflang tag generator

Paste one language code and absolute URL per line. The generator validates the set and creates reciprocal-ready HTML link tags.

One entry per line. Separate the BCP 47 code and absolute URL with a comma. Include each page itself and add x-default when appropriate.

Valid entries: 4x-default includedErrors: 0

Generated hreflang tags

<link rel="alternate" hreflang="en" href="https://example.com/en/product/" />
<link rel="alternate" hreflang="es" href="https://example.com/es/product/" />
<link rel="alternate" hreflang="de-DE" href="https://example.com/de/produkt/" />
<link rel="alternate" hreflang="x-default" href="https://example.com/languages/" />

Private by design. This tool runs entirely in your browser. Pasted values are never uploaded, stored, or included in analytics.

Locale Code ConverterEnter a locale such as en_US, pt-BR, zh-Hant-TW, or a common language name. Get canonical codes and readable details instantly.i18n JSON Key CheckerPaste a source-language JSON dictionary and a target translation. Find missing and extra nested keys instantly without uploading either file.

How to generate hreflang tags

  1. List every localized pageEnter one BCP 47 language code and absolute page URL per line, separated by a comma.
  2. Resolve validation errorsFix invalid codes, duplicate languages, or incomplete URLs until the full set is valid.
  3. Copy the complete tag setCopy the generated HTML into every page in the language group so all alternates are reciprocal.

Build a complete hreflang set

Enter each BCP 47 language or language-region code beside its absolute page URL. The tool canonicalizes code casing, rejects duplicate languages, validates HTTP and HTTPS URLs, and escapes URL characters safely for an HTML attribute.

Copy the generated tags into the head of every page in the group. Each localized page needs the same complete set, including a self-reference. An incomplete one-way set is a common reason hreflang annotations are ignored.

Hreflang and canonical tags solve different problems

A canonical tag identifies the preferred URL for duplicate or near-duplicate content. Hreflang identifies equivalent pages made for different language audiences. Localized pages should normally canonicalize to themselves, not all point to the English version.

Keep URL shapes stable and use the exact final, indexable URLs. Redirecting, blocked, noindex, or conflicting canonical URLs weaken the language cluster and make debugging much harder.

Private, browser-only generation

The URL list never leaves your browser. Analytics records only safe counts such as the number of valid rows and validation errors—not the domains, paths, query strings, or tags you enter.

Frequently asked questions

What does hreflang do?

Hreflang tells search engines which URL is intended for a particular language or language-region audience. It helps the right localized version appear in search results, but it does not replace a canonical tag or redirect users.

Do hreflang tags need to be reciprocal?

Yes. Every page in a language group should list itself and every alternate in that same group. If page A points to page B but page B does not point back, search engines may ignore the relationship.

Should I include x-default?

Use x-default for a language selector, global fallback, or default page that is not aimed at one specific language. It is optional, but useful when users may not match any of the listed locales.