← All Tools

BCP 47 Language Tag Parser & Matcher

Parse any language tag — zh-Hant-HK, en-GB-oxendict, de-CH-1901-x-phonebk, i-navajo — into the parts RFC 5646 defines (language, extlang, script, region, variants, extensions, private-use). Validates per-subtag shape, canonicalizes deprecated codes (iw→he, zh-yue→yue), emits the RFC 4647 fallback chain, and runs Basic / Extended Filtering and Lookup against an Accept-Language header so you can debug why your locale switcher picked the wrong one.

Parse a tag

try: en-US zh-Hant-HK de-CH-1901 es-419 sr-Cyrl-RS i-klingon (grandfathered) iw-IL (deprecated) ar-arb-AE (extlang) extensions + private en-GB-oxendict x-my-locale (private-use only)

Canonicalized & normalized

Case per RFC 5646 §2.1.1: language lowercase, script Title-Case, region UPPERCASE, variants and extensions lowercase. Case does not affect equality — matchers must be case-insensitive.

RFC 4647 fallback chain

The Lookup algorithm removes subtags from the right until a match is found. Single-character extension singletons and their subtags are removed as a group.


Match against Accept-Language


Bulk validate

Notes