String.prototype.toLocaleUpperCase(locales?) returns a new uppercased string using locale-specific case rules. For most Latin text it matches toUpperCase(); languages like Turkish can differ.
Pass the required arguments shown below. Check return values and browser support before you rely on the result.
Syntax
Call string.toLocaleUpperCase. Start with this line.
JavaScript
str.toLocaleUpperCase(locales?)
Call
What it does
str.toLocaleUpperCase(locales?)
Primary signature.
string.toLocaleUpperCase(...)
Call with the arguments your case needs.
Built into JavaScript. Call toLocaleUpperCase(...) on a string (or String instance) — no import required.
Library declarations
JavaScript
str.toLocaleUpperCase(locales?)
Parameters
Parameter
Description
locales
Optional. BCP 47 tag or array; default = host locale
Return Value
Return Value
Description
*
New uppercased string
JavaScript Examples
Example 1 — Basic Locale Uppercase
Uppercase a string with the host default locale (or a simple Latin locale).
Turkish mapping."tr" uppercases it to dotted İ (U+0130).
English mapping."en-US" produces plain I.
Pass the UI language. Case folding for display should match the user’s locale.
Example 3 — toLocaleUpperCase vs toUpperCase
They often match; choose locale-aware when language rules can differ.
JavaScript
const city = "istanbul";
console.log(city.toLocaleUpperCase("tr"));
console.log(city.toUpperCase());
console.log("hello".toLocaleUpperCase() === "hello".toUpperCase());
// true for simple Latin text
console.log("straße".toLocaleUpperCase("de"));
// "STRASSE" (length grows)
Default Unicode path.toUpperCase() does not take a locale.
ASCII is boring (in a good way). Simple Latin often matches on both APIs.
Watch expansions. Characters like ß can become two letters when uppercased.
Compatibility
Browser & Runtime Support
String.prototype.toLocaleUpperCase() is widely available. The optional locales argument is supported in modern browsers and Node.js.
✓ Baseline · Widely available
String.toLocaleUpperCase()
Supported in modern browsers and Node.js. Prefer an explicit locales tag when your app must behave the same across hosts.
98%Modern browser support
Google ChromeSupported · Desktop & Mobile
Full support
Mozilla FirefoxSupported · Desktop & Mobile
Full support
Apple SafariSupported · macOS & iOS
Full support
Microsoft EdgeSupported · Chromium
Full support
Internet ExplorerNo native support · Use a polyfill
Polyfill
OperaSupported · Modern versions
Full support
Samsung InternetSupported · Android
Full support
BunSupported · JavaScript runtime
Supported
DenoSupported · JavaScript runtime
Supported
Node.jsSupported · Server runtime
Supported
Android WebViewSupported · Modern WebView
Full support
toLocaleUpperCase()Excellent
Bottom line: Safe for modern web apps. For ASCII-only pipelines, toUpperCase() is fine; for multilingual UI, pass the active locale explicitly.
Frequently Asked Questions
String.prototype.toLocaleUpperCase(locales?) returns a new string with characters uppercased using locale-specific case mappings. Without locales, the host default locale is used.
For most Latin text they match. toLocaleUpperCase respects language rules (for example Turkish dotted İ). Prefer toLocaleUpperCase when the UI language can change case mapping.
A BCP 47 language tag such as "tr" or "en-US", or an array of tags. Unlike Intl.Collator, toLocaleUpperCase does not do locale matching — it uses the first locale in the list (or the default if the list is empty).
In Turkish, lowercase i uppercases to İ (U+0130), while English produces plain I. So "istanbul".toLocaleUpperCase("tr") is "İSTANBUL".
Yes. Some characters expand to two or more when uppercased (for example German ß → SS). Conversion is not always a 1:1 mapping, so length can change.
No. Strings are immutable. The method returns a new uppercased string.