BlockSum Game - puzzle and math brain training

Locale Converter

Convert BCP 47, POSIX, and Accept-Language locale strings.

Apps, servers, and browsers disagree about how to write a locale. Web and JavaScript Intl want BCP 47 tags like en-US. Unix shells and older backends still emit POSIX strings like en_US.UTF-8. HTTP clients send Accept-Language headers with quality weights. Utilitoo's Locale Converter normalizes those forms and shows what your browser's Intl APIs actually resolve for numbers, dates, and currency.

Frontend engineers convert LANG or LC_ALL values before passing them to Intl.NumberFormat. Localization teams check HTML lang attributes against Accept-Language chains from production logs. Support engineers decode a customer's language preference when a date looks "wrong" (10.08.2026 vs 8/10/2026) but the timezone was already UTC - that is a locale mismatch, not an offset bug.

Paste a tag, POSIX string, or full Accept-Language header, then click Convert - or use Use my locale to inspect the current browser language. You get canonical BCP 47, a POSIX-style string, HTML lang, language/script/region fields, and live formatting previews. Pair with Timezone Converter when the bug is zone offset rather than language, Timestamp Converter when the value is an epoch instant, HTTP Header Viewer when you have a raw request dump, and User Agent Parser when device and browser context matter too.

Everything runs in your browser via the Intl API. Locale strings from logs are not uploaded. Prefer BCP 47 in HTML, JavaScript, and modern APIs; keep POSIX only where a runtime still requires underscores and a charset suffix. Underscores, charset suffixes, and Accept-Language quality lists are the usual conversion traps - the blog guide POSIX to BCP 47 Locale Conversion Pitfalls walks through each one with examples.

Locale Converter normalizes BCP 47 tags, POSIX strings, and Accept-Language headers, then shows live Intl number, date, and currency previews for the resolved locale. It is Utilitoo's landing page for locale converter online searches.

Common use cases

  • Converting LANG or LC_ALL values like en_US.UTF-8 into BCP 47 tags for JavaScript Intl.
  • Checking HTML lang attributes against Accept-Language chains from production request logs.
  • Previewing how numbers, dates, and currency render for a target locale before shipping copy.
  • Teaching the difference between POSIX underscores and web hyphenated locale tags.
  • Debugging wrong date format tickets that are really locale mismatches, not timezone bugs.

Tips & common mistakes

Prefer BCP 47 (en-US) for HTML lang and Intl APIs. Keep POSIX forms only where a shell or legacy runtime requires them. When an Accept-Language header lists several tags, convert the primary preference first, then map to locales your product actually supports. Pair with Timezone Converter when the issue is offset rather than language. POSIX underscores, charset suffixes, and Accept-Language lists are covered in the blog guide POSIX to BCP 47 Locale Conversion Pitfalls.

Common errors

  • Charset suffixes like .UTF-8 are stripped during normalization - that is expected for BCP 47 output.
  • Resolved Intl locale may be a parent fallback if the browser lacks the exact tag you typed.
  • Underscores in ICU-style tags (zh_Hans_CN) are converted to hyphens for web use.

How to use

  1. Paste a BCP 47 tag, POSIX locale (e.g. en_US.UTF-8), or Accept-Language header.
  2. Click Convert, or use Use my locale to inspect the browser language.
  3. Copy BCP 47, POSIX, HTML lang, and formatting previews for your app or docs.

Frequently Asked Questions

How do I convert a POSIX locale to BCP 47 online?

Paste a value like en_US.UTF-8 into Utilitoo's Locale Converter and click Convert. The tool strips charset/modifiers, swaps underscores for hyphens, and returns a canonical BCP 47 tag such as en-US. For Docker LANG values, Accept-Language chains, and zh-Hans script traps, see the blog guide POSIX to BCP 47 Locale Conversion Pitfalls.

What is the difference between BCP 47 and POSIX locales?

BCP 47 uses hyphens (en-US) and is standard for HTML lang and JavaScript Intl. POSIX often uses underscores and a charset (en_US.UTF-8) for shells and older server environments. Convert at the boundary: POSIX in, BCP 47 out for the browser.

Can I paste an Accept-Language header?

Yes. Paste a header such as Accept-Language: fr-CA,fr;q=0.9 and Utilitoo extracts the preference chain, converts the primary tag, and shows Intl previews for that locale.

Why does the resolved locale differ from what I typed?

Browsers may canonicalize or fall back to a supported parent locale. The resolved number and date locale fields show what Intl actually used for formatting.

Are locale strings uploaded during conversion?

No. Parsing and Intl previews run entirely in your browser on Utilitoo - useful when inspecting production Accept-Language values from tickets.

Related Tools