Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / JavaScript

String.prototype.toLowerCase() — lowercase conversion

The toLowerCase() method returns a string converted to lowercase using Unicode rules, without changing the original. It takes no parameters and does not adapt its result to the user's language.

Version: ECMAScript and Web APIs; exact feature edition and browser support reviewed per entry; Node 24 in repository does not prove browser API support

Syntax

string.toLowerCase()

String.prototype.toLowerCase() returns a string with letters converted to lowercase according to Unicode default case conversion rules. Call it as string.toLowerCase(), without arguments. The original string stays unchanged; assign the result to a variable to keep it.

Conversion is locale-insensitive, but it can depend on surrounding characters. Do not treat it as a universal rule for case-insensitive text comparison. Converting to uppercase and then to lowercase does not necessarily produce the same result as calling toLowerCase() directly.

One character can map to several code points, so the result's length can change. In the example, \u0130 becomes the sequence i\u0307, whose length is 2.

The method is generic: when invoked through String.prototype.toLowerCase.call(value), it first rejects null and undefined with a TypeError, then converts other values to a string. That conversion can also throw.

Examples

const original = "HELLO ŁÓDŹ";
const lower = original.toLowerCase();
console.log(lower);
console.log(original);

const expanded = "\u0130".toLowerCase();
console.log(expanded === "i\u0307");
console.log(expanded.length);

Result

hello łódź
HELLO ŁÓDŹ
true
2

The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.

Sources