Hreflang Generator
Generate hreflang tags for international SEO. Add one row per language/region, then copy the HTML, HTTP header, or JSON-LD output.
Page Entries
1 / 30 rowsValidation Warnings
Row 1 has an empty URL.
Paste these tags inside the <head> section of each language variant of the page.
Add at least one URL to generate output.
Hreflang generator: build international SEO tags for multilingual websites for free
If your website serves content in multiple languages or targets users in different countries, hreflang tags are essential. Without them, search engines may serve the wrong language version to your users: a French speaker in France might see your English page, or a US visitor might see the Australian pricing page. Properly implemented hreflang tells Google and other search engines exactly which version to show to which audience.
This hreflang generator simplifies the process of building correctly formatted tags. Add one row per language or language-region combination, toggle x-default for a catch-all fallback, and copy the output in whichever format suits your implementation: inline HTML, server-side HTTP headers, or JSON-LD for reference. Validation warnings catch duplicate language codes, empty URLs, and missing x-default before you deploy.
Step-by-step guide
- 1Add a row for each language/region
Enter the full URL and select the matching language or language-region combination. Add rows with the + Add Page button. - 2Enable x-default
Leave the Auto-add x-default toggle on to automatically include an x-default entry pointing to your first URL: this is the fallback for users whose language isn't explicitly listed. - 3Review validation warnings
The tool flags common mistakes: duplicate language codes, empty URL fields, and missing x-default. Fix these before deploying. - 4Choose your output format
Switch between HTML <link> tags (for the <head> section), HTTP header format (for server/CDN config), or JSON-LD (for reference). - 5Copy and deploy
Click Copy All and paste the output into your CMS, server config, or HTML template. Remember: identical hreflang tags must appear on ALL language variants of the page.
Frequently Asked Questions
- What is a hreflang tag?
- A hreflang attribute tells Google which language and region a page targets and provides the URLs of equivalent pages in other languages. It ensures users are served the most relevant language version of your content in search results.
- Do all language variants need hreflang tags?
- Yes: hreflang is reciprocal. Every URL referenced in a hreflang tag must itself contain hreflang tags pointing back to all other language variants including itself. A one-way hreflang is ignored by Google.
- What is x-default?
- The x-default hreflang value specifies the page to serve to users whose language preference doesn't match any of the explicitly listed language variants. It's typically set to your main or English version and is considered best practice.
- Should I use language-only codes (en) or language-region codes (en-US)?
- Language-only codes (en) target all English speakers regardless of region. Language-region codes (en-US, en-GB) allow you to serve region-specific content (pricing, dates, currency) to the correct audience. Use region codes only when the content genuinely differs by region.
- Where do I place hreflang tags?
- You can place them in the HTML <head> section as <link rel='alternate' hreflang='...'/> tags, as HTTP Link headers in the server response, or in the XML sitemap. All three methods are valid and Google treats them equivalently.
- Can I use hreflang for language variations of the same country?
- Yes, though it is rare. You can use codes like en-US and es-US to target English and Spanish speakers in the United States separately.
- Why is JSON-LD not recommended for hreflang?
- JSON-LD is not an officially supported method for hreflang by Google. It is included in this tool for reference and experimentation only. For production use, stick with HTML <link> tags or HTTP headers.
- Is this tool free?
- Yes, completely free with no account required and no usage limits.
AlteredIdea vs alternatives
vs manual coding: Generates all tags automatically with validation: no risk of typos in language codes or missing reciprocal tags.
vs paid SEO tools: Free, no account, no export limits, supports HTML/HTTP/JSON formats.
vs WordPress plugins: Works with any CMS or static site: just copy and paste the output wherever you need it.