Skip to content
Rankora
Free · runs in your browser

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

  1. Paste a list of codes (fr-fr, en_GB, zh-Hant, es-419…), one per line.
  2. The tool checks the BCP 47 shape, the language and the region using your browser's CLDR data, and normalises the casing.
  3. 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.