Language Tag Checker (BCP 47)
Paste your codes, one per line: the tool validates them, fixes the casing, catches common mistakes and tells you whether hreflang accepts them.
Privacy and cost
This tool runs in your browser. What you type or paste is not sent to our servers and it costs nothing to use.
How it works
- Paste a list of codes (fr-fr, en_GB, zh-Hant, es-419…), one per line.
- The tool checks the BCP 47 shape, the language and the region using your browser's CLDR data, and normalises the casing.
- For each code you see the correct form, whether hreflang accepts it, the suggested fix and the explanation.
Example
Out of seven codes (fr-fr, en-UK, zh_CN, es-419, jp, pt-BR, ar-MA), 3 are usable as hreflang after normalisation: fr-fr becomes fr-FR, pt-BR and ar-MA are valid. "en-UK" becomes en-GB (UK is not the ISO code for the United Kingdom), "jp" becomes ja, "zh_CN" needs a hyphen (zh-CN) and "es-419" is valid BCP 47 but rejected by hreflang.
What the result means
A BCP 47 code is a lower-case language, an optional script (Hant, Latn) and an optional upper-case region, joined by hyphens. hreflang is stricter: a two-letter ISO 639-1 language, an optional script and a two-letter ISO 3166-1 region. The HTML lang attribute accepts any valid BCP 47 tag.
Common problems this tool helps with
- Country codes used as language codes (jp instead of ja, gr instead of el).
- en-UK, es-LA or en-EU: regions that do not exist in ISO 3166-1.
- An underscore (en_US) instead of a hyphen, or unusual casing.
- Mixing up three-letter codes (eng, fra) with the two-letter ones hreflang expects.
Frequently asked questions
Should I write fr-FR or fr-fr?
Casing has no technical effect, but the standard form is a lower-case language and an upper-case region: fr-FR. The tool returns it.
Why is es-419 rejected in hreflang?
419 is a UN region code (Latin America), valid in BCP 47 and in the lang attribute, but hreflang only accepts two-letter ISO 3166-1 regions. Use es alone, or one code per country.
Where do the code lists come from?
From the locale data (CLDR) built into your browser through Intl: the tool relies on no hand-written list. As a result the language list can differ slightly between browsers.
Related tools
- Hreflang GeneratorEnter each language version (code and URL): the tool validates the codes, adds x-default and outputs the same block to paste on every version.Free · runs in your browser
- Hreflang ValidatorEnter a URL or paste the HTML: the tool reads the hreflang tags and the Link header, checks every code and spots the classic mistakes.Free · no account needed
- International SEO URL PlannerList your markets (language-region) and answer five questions: the tool recommends a URL structure, proposes the addresses and compares the three options.Free · runs in your browser
- Meta Tag AnalyzerPaste a page's HTML or enter its URL to list every meta tag in one table and spot the ones that are missing or off.Free · no account needed
- XML Sitemap GeneratorPaste your URLs, one per line: the tool outputs a valid, correctly escaped sitemap.xml and splits it with an index if you go over the limits.Free · runs in your browser