Other Tools
Locale Code Converter
Convert and normalize BCP 47, POSIX, Java, ICU and Accept-Language locale identifiers, then preview regional formats.
Paste a BCP 47 tag, POSIX/Java locale or a complete Accept-Language value.
en-USen_US.UTF-8en-USen_USen_USen_US.UTF-8Intl format preview
Locale Converter Online
This locale code converter normalizes BCP 47 tags, POSIX locale strings, Java and ICU identifiers, and Accept-Language values. It also previews how the resolved locale formats numbers, currency, and dates in the browser.
Supported Locale Formats
- BCP 47 / HTML lang:
zh-Hans-CN,en-US - POSIX:
en_US.UTF-8 - Java and ICU:
en_US,zh_Hans_CN - Accept-Language:
fr-CA,fr;q=0.9,en;q=0.8
How to Use
- Paste a locale identifier or Accept-Language header.
- Review the canonical BCP 47, POSIX, Java, ICU, and HTML values.
- Check the parsed language, script, region, and base name.
- Copy the format required by your application.
Common Use Cases
- Convert
en_US.UTF-8from a Linux environment to the browser-friendlyen-UStag. - Normalize
zh_Hans_CNto canonicalzh-Hans-CN. - Parse the preferred locale from an
Accept-Languagerequest header. - Validate language, script, and region codes during i18n development.
- Preview regional number, currency, and date formatting.
✨ Key Features
- Locale normalization: Convert common locale identifiers into canonical BCP 47.
- Multiple output formats: Copy POSIX, Java, ICU, and HTML-compatible values.
- Accept-Language parsing: Resolve the highest-priority language range.
- Locale-aware output: Compare number, currency, and datetime formatting.
- Timezone support: Date/time output can be formatted with selected timezone.
- Copy-ready results: Reuse outputs in UI, docs, and test cases instantly.
- Client-side processing: Runs in browser for fast response and privacy-friendly usage.
📋 Quick Examples
en_US.UTF-8→ BCP 47en-USand POSIXen_US.UTF-8zh_Hans_CN→ BCP 47zh-Hans-CNsr_RS@latin→ BCP 47sr-Latn-RSfr-CA,fr;q=0.9→ primary localefr-CA
🔧 Usage Tips
- Use BCP 47 tags in HTML
langattributes and browserIntlAPIs. - Use POSIX values for Unix environment variables such as
LANGandLC_ALL. - An underscore and a hyphen are not always interchangeable; normalize before saving.
- Currency preview changes display formatting, not the underlying exchange rate.
❓ FAQ
Q1: What is the difference between BCP 47 and POSIX locale formats?
A: BCP 47 commonly uses hyphens, such as en-US, while POSIX commonly uses underscores and an encoding, such as en_US.UTF-8.
Q2: Can it parse an Accept-Language header?
A: Yes. Paste the complete value and the converter selects the language range with the highest quality priority.
Q3: Is my input uploaded to the server?
A: No. Parsing, normalization, and previews are handled in your browser.