Category: Developer tools
Hreflang Tag Generator
Generate reciprocal hreflang link tags from locale and URL rows
Enter one locale and URL per line, including an optional x-default row, to generate <link rel="alternate" hreflang="..."> tags with basic validation. Runs entirely in your browser.
<link rel="alternate" hreflang="en" href="https://example.com/" /> <link rel="alternate" hreflang="es" href="https://example.com/es/" /> <link rel="alternate" hreflang="fr" href="https://example.com/fr/" /> <link rel="alternate" hreflang="x-default" href="https://example.com/" />
No issues found.
Everything on this page is processed in your browser. Nothing is uploaded.
What this tool does
Hreflang tags tell search engines which URL to show for each language or region, but a single duplicated locale code or a URL missing its scheme can quietly break the whole cluster. This tool takes a list of locale and URL pairs, one per line, generates the corresponding link tags, and flags duplicate locale codes, rows it could not parse, and URLs without an http or https scheme.
How to use it
- Enter one row per line as a locale code followed by a URL, such as "es https://example.com/es/".
- Add an x-default row if the site has a language-neutral fallback page.
- Copy the generated tags and review the issues list for anything that needs fixing.
Privacy
This tool runs entirely in your browser. Your input is never uploaded, stored or shared — closing the tab removes it.
Frequently asked questions
- Is my data sent anywhere?
- No. Parsing and tag generation happen in JavaScript running in your browser tab.
- Do hreflang tags need to be reciprocal?
- Yes. Search engines expect every URL in a cluster to link back to every other URL, including itself; this tool does not check other pages, so keep the same row set on each page's version of the tags.
- What counts as a duplicate locale code?
- Two rows using the same locale code regardless of letter case, such as ES and es, which would otherwise produce two conflicting hreflang entries.