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-US
en_US.UTF-8
en-US
en_US
en_US
en_US.UTF-8
Languageen
Script
RegionUS
Base nameen-US

Intl format preview

Number1,234,567.89
Currency$199.99
DateJul 19, 2026

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

  1. Paste a locale identifier or Accept-Language header.
  2. Review the canonical BCP 47, POSIX, Java, ICU, and HTML values.
  3. Check the parsed language, script, region, and base name.
  4. Copy the format required by your application.

Common Use Cases

  • Convert en_US.UTF-8 from a Linux environment to the browser-friendly en-US tag.
  • Normalize zh_Hans_CN to canonical zh-Hans-CN.
  • Parse the preferred locale from an Accept-Language request 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 47 en-US and POSIX en_US.UTF-8
  • zh_Hans_CN → BCP 47 zh-Hans-CN
  • sr_RS@latin → BCP 47 sr-Latn-RS
  • fr-CA,fr;q=0.9 → primary locale fr-CA

🔧 Usage Tips

  1. Use BCP 47 tags in HTML lang attributes and browser Intl APIs.
  2. Use POSIX values for Unix environment variables such as LANG and LC_ALL.
  3. An underscore and a hyphen are not always interchangeable; normalize before saving.
  4. 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.