TextZap / Hreflang generator
FREE ONLINE TEXT TOOLS

Hreflang generator

Enter language code and URL on each line

✓ No sign-up✓ Local processing

Hreflang generator

What is hreflang?

Hreflang identifies equivalent pages in different languages or regions. It helps search engines select an appropriate version for a visitor, rather than translating the page itself.

How to use the generator

Enter one language code and absolute URL per line. Include the current page and use the same set of links on every equivalent page. Use x-default for a suitable fallback when needed.

Practical example

An English product page and its Lithuanian translation can use en and lt. A regional English page may use en-GB. Each page should reference itself and the other equivalent pages.

Should I use canonical and hreflang together?

Normally each indexable translation has its own canonical URL. Avoid pointing every translation to the English page. Check that the alternate URLs are accessible and return reciprocal links.

Does the tool check live pages?

No. It generates markup from your input. Check HTTP responses, canonical tags and reciprocal links after publishing.

What it does

Generate alternate language links for equivalent localized pages.

How to use

Enter one language code and absolute URL per line, separated by a space. Include the current page and repeat the same set on each equivalent page.

Example

Input text

en https://example.org/en/
x-default https://example.org/

Result

<link rel="alternate" hreflang="en" href="https://example.org/en/">
<link rel="alternate" hreflang="x-default" href="https://example.org/">

Limitations

The tool checks code syntax, not whether pages exist or return reciprocal links.

Enter one language code and URL per line. Check return links on the pages themselves.

Explore all 200 text tools

Analysis · 25

Formatting · 30

Cleaning · 15

Generators · 20

Conversion · 30

SEO & extraction · 35

URL slug generatorCreate a clean URL slugKeyword density checkerCalculate frequency and percentage of wordsKeyword occurrence counterCount literal keyword occurrences ignoring caseExtract emailsExtract common email address patternsExtract URLsExtract HTTP and HTTPS URLsExtract numbersExtract signed integers and decimalsExtract hashtagsExtract unique hashtagsExtract mentionsExtract social media mentionsMeta title length checkerMeasure title length against a chosen character targetMeta description length checkerMeasure description length against a chosen targetN-gram counterCount consecutive word groupsExtract domainsExtract hostnames from web URLsText truncatorLimit text to a chosen character countExtract HTML headingsExtract H1 through H6 headings from HTMLExtract HTML linksExtract href attributes from HTML anchorsReadability checkerAnalyze sentence length and long wordsFlesch reading easeEstimate English Flesch reading easeSyllable counterEstimate syllables using language-specific vowel rulesEssay word counterTrack essay word count against a targetText similarity checkerCompare unique word sets using Jaccard similarityStop words removerRemove common words using the list for the selected languageLong sentence finderFind sentences exceeding a word limitGoogle SERP previewPreview a sample search result snippetOpen Graph generatorGenerate escaped social sharing meta tagsRobots.txt generatorGenerate robots.txt from disallowed pathsSitemap XML generatorGenerate sitemap from absolute URLs, one per lineHreflang generatorEnter language code and URL on each lineCanonical tag generatorGenerate canonical tag from absolute URLSchema markup generatorEnter website name and URL on separate linesMeta tag generatorEnter title and description on separate linesTwitter card generatorEnter title, description and image URL on separate linesUTM builderEnter URL, source, medium and campaign on separate linesURL parserInspect URL componentsURL cleanerRemove common tracking parametersRedirect generatorEnter old path and new absolute URL on separate lines

Social Media · 20

Developer Tools · 25