Generate hreflang tags for multi-language / multi-region pages.
Generate hreflang tags for international/multilingual pages.
This tool turns a list of language versions into hreflang link tags for the <head> of your pages. Each row pairs a language or language-region code with a URL, and the output is one <link rel="alternate"> element per row, carrying the code and the URL, under a short HTML comment. It escapes quotes and angle brackets in the values. It does not visit the URLs, so it cannot confirm the pages exist or that they link back to each other. It runs in your browser only.
Google ignores hreflang pairs that are not confirmed from both sides. If the English page points to the Spanish page, the Spanish page must point back. That is why the whole block, including the line for the page itself, belongs on every version. Use absolute URLs, and point each tag at the canonical address of that version, not at a redirecting or parameter URL.
The menu offers 21 codes. If you need another language or region, edit the output by hand, using an ISO 639-1 language code and, optionally, an ISO 3166-1 alpha-2 region code (en-GB, not en-UK). There is no delete button: a row with an empty URL is skipped, so clear the URL to drop it. The tool also does not warn about duplicate codes, so check the list before you copy.