Locale Converter
Parse locale identifiers, preview number/date/currency formatting, and compare locales side by side
Popular Locales
Invalid locale identifier. Please enter a valid BCP 47 locale tag.
Browser Support
Parsed Locale Info
Format Alternatives
Display Names
Data Preview
Number Formatting
Currency Formatting
Date & Time
Relative Time
List Formatting
Collation
Compare how two different locales format the same data side by side.
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, and lists are formatted in any locale as you type.
Comprehensive Analysis
Parse locale components, show display names in multiple languages, and compare two locales side by side.
Frequently Asked Questions
What is a locale identifier?
A locale identifier is a short string that identifies a specific combination of language, region, script, and other preferences. Common formats include BCP 47 tags (en-US, zh-Hans-CN) and POSIX identifiers (en_US.UTF-8). They determine how text, numbers, dates, and currencies are displayed.
What is the difference between BCP 47 and POSIX locale formats?
BCP 47 uses hyphens to separate components (en-US, zh-Hans-CN) and is the standard for web technologies. POSIX uses underscores (en_US, zh_Hans_CN.UTF-8) and is common in Unix/Linux systems. Both identify the same locale but use different syntax conventions.
How does this tool work without a server?
This tool uses the browser's built-in Intl API family (Intl.Locale, Intl.NumberFormat, Intl.DateTimeFormat, Intl.DisplayNames, 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 vary between browsers and operating systems. Chrome, Firefox, and Safari may use different Unicode CLDR data versions, leading to subtle differences in formatting. The resolved locale shown in the results reflects what your browser actually uses.
What does "resolved locale" mean?
When you request a locale like "en", the browser may resolve it to a more specific locale like "en-US" or "en-Latn-US" depending on its available data. The resolved locale is the actual locale the browser uses for formatting, which may differ from your input.
Understanding Locale Identifiers
BCP 47 Structure
A BCP 47 language tag consists of subtags separated by hyphens: language (required, 2-3 letters), script (optional, 4 letters), region (optional, 2 letters or 3 digits), and variants (optional). Examples:
- • Language only
en, zh, ar - • Language + Region
en-US, zh-CN, pt-BR - • Language + Script
zh-Hans, sr-Latn - • Full tag
zh-Hans-CN, en-Latn-US
Intl API in Practice
The JavaScript Intl API family provides locale-aware formatting for numbers, dates, lists, relative time, and more. Use Intl.Locale to parse identifiers, Intl.DisplayNames to get human-readable names, and Intl.NumberFormat/DateTimeFormat for formatting.
- •
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 that fits your needs. For web applications, use the user's preferred language from navigator.language and fall back gracefully. Test with multiple locales early in development.