Enter a locale identifierType a BCP 47 tag, POSIX-style locale, or language name in the input field.
Review the canonical formatsCheck the normalized BCP 47 and underscore forms plus the detected language, script, region, and writing direction.
Copy the conversionCopy the labeled result when you are ready to use the locale in code or configuration.
Convert locale formats without guessing
Locale identifiers look small, but inconsistent casing, separators, and region assumptions regularly break language routing and translation fallbacks. This converter canonicalizes a code with the browser Internationalization API and shows the equivalent formats side by side.
You can start with a BCP 47 tag, an underscore-style code, or a common language name. The result separates the language, script, and region so you can see exactly what the identifier promises to users and software.
BCP 47, POSIX, and ISO codes explained
BCP 47 is the web standard: language first, then optional script and region subtags separated by hyphens. POSIX-style locales commonly use underscores. The language subtag normally comes from ISO 639, while the two-letter region subtag comes from ISO 3166-1.
Canonicalization fixes presentation, not meaning. For example, it can normalize casing and known aliases, but it cannot decide whether generic Spanish should become es-ES or es-MX. That product decision should reflect the content you actually translated.
Use the narrowest locale that stays accurate
Choose a language-only tag when one translation genuinely serves every region. Add a region when spelling, currency, legal text, measurements, or product availability differs. Add a script when readers of the same language use materially different writing systems.
Everything entered here is processed in your browser. Multilocale does not receive the value, store it, or attach it to analytics events.
Frequently asked questions
What is the difference between en-US and en_US?
en-US is the BCP 47 form used by HTML, hreflang, JavaScript, and most web APIs. en_US is the POSIX-style form still used by some operating systems, databases, and translation files. They usually describe the same English-for-the-United-States locale.
Is a locale code the same as a language code?
No. A language code such as en identifies a language. A locale can also identify a script, region, or both, such as zh-Hant-TW for Traditional Chinese used in Taiwan. Use only the detail your product actually needs.
Which locale format should I use on the web?
Use canonical BCP 47 tags with hyphens for HTML lang attributes, hreflang, Intl APIs, and HTTP language negotiation. Keep underscore codes only when an existing framework or file convention explicitly requires them.