Locale Converter Online: BCP 47 & POSIX Formatter

Convert and normalise locale strings instantly. Preview number (lakh/crore), date, and currency formatting with side-by-side comparison for Indian and global…

Popular Locales

Try Common Inputs

Browser Support

Enter a locale identifier (e.g., en-IN) to see parsing results and formatting previews for lakhs, rupees, and dates...

How to Use

  1. 1

    Paste Any Locale String

    Start with browser locales, POSIX values like en_US.UTF-8, script tags like zh_Hans_CN, or an Accept-Language header.

  2. 2

    Normalise The Tag

    The tool canonicalises the value into a BCP 47 locale and shows matching POSIX, HTML lang, and Intl snippets.

  3. 3

    Copy The Right Format

    Use the output block that fits your use case: web markup, JavaScript Intl, environment variables, or QA docs.

  4. 4

    Compare Output Differences

    Switch to compare mode to inspect how two locales differ for numbers, currency, dates, and collation behaviour.

Why Use Be Converter?

Browser Native

Powered by built-in Intl APIs. No server calls, no external dependencies. Works offline and respects your privacy.

Real-time Preview

Instantly see how numbers, dates, currencies (like ₹), and lists are formatted in any locale as you type.

Normalise Real Inputs

Paste POSIX locales, ICU-style underscores, or Accept-Language headers and turn them into clean BCP 47 and HTML-ready locale strings.

Comprehensive Analysis

Parse locale components, show display names in multiple languages (Hindi, Tamil, etc.), and compare two locales side by side.

Perfect For

Convert en_IN to en-US Prepare HTML lang attributes Normalise Accept-Language headers QA locale fallback chains Check Intl resolved locales Document i18n implementation details

Frequently Asked Questions

What is a locale identifier?
A locale identifier is a code string that defines a specific combination of language, region, and script (e.g., en-IN for Indian English or hi-IN for Hindi). It dictates how data is displayed, such as formatting 1,00,000 as a lakh or ₹1,00,000.00 as currency.
What is the difference between BCP 47 and POSIX locale formats?
BCP 47 uses hyphens to separate components (e.g., en-IN) and is the standard for web technologies. POSIX uses underscores (e.g., en_IN) and is common in legacy Unix/Linux systems. Both identify the same locale but use different syntax conventions.
How does this tool work without a server?
This tool utilises the browser's built-in Intl API family (Intl.Locale, Intl.NumberFormat, etc.) to parse locale identifiers and generate formatting previews. All processing happens in your browser — no data is sent to any server.
Why do some locales show different results across browsers?
The Intl API implementation and locale data (CLDR) vary between browsers and operating systems. Chrome on Android may behave differently from Safari on iOS. The resolved locale shown in the results reflects what your browser actually uses.
What does "resolved locale" mean?
When you request a generic locale like "en", the browser may resolve it to a specific default based on your region, such as "en-IN" or "en-US". The resolved locale is the actual tag the browser uses for formatting.

Common Locale Conversion Examples

These are the most common locale-string cleanup tasks developers and localisation teams search for when they need a locale converter online.

Input
en_US.UTF-8
Output
en-US

Convert Unix-style locale environment values into a BCP 47 tag you can use in frontend code.

Input
zh_Hans_CN
Output
zh-Hans-CN

Normalise script subtags with the casing web platforms expect.

Input
sr_RS@latin
Output
sr-Latn-RS

Translate a POSIX modifier into a script-aware locale tag for product localisation.

Input
Accept-Language: fr-CA,fr;q=0.9
Output
fr-CA

Extract the preferred locale from a browser header before routing or formatting content.

Understanding Locale Identifiers

BCP 47 Structure

A BCP 47 language tag consists of subtags separated by hyphens: language (required), script (optional), region (optional), and variants. Common Indian examples include:

  • Language only en, hi, te, mr
  • Language + Region en-IN, hi-IN, kn-IN
  • Language + Script zh-Hans, sr-Latn
  • Full tag en-Latn-IN, zh-Hans-CN

Intl API in Practice

The JavaScript Intl API family provides locale-aware formatting for numbers (including lakh/crore systems), dates, and lists. Use Intl.Locale to parse identifiers and Intl.NumberFormat to display currency correctly (e.g., ₹).

  • Intl.getCanonicalLocales(["pt-br"]) - canonicalize
  • new Intl.Locale("zh-Hans-CN") — parse
  • Intl.DisplayNames — display names
  • Intl.NumberFormat — numbers
  • Intl.DateTimeFormat — dates

Best Practice: Always use the most specific locale tag for your target audience. For Indian users, specifically use en-IN or hi-IN to ensure number and date formats align with local expectations.

Copied to clipboard!