JavaScript String.prototype.toLowerCase() Method
The toLowerCase() method returns a copy of a string with all letters converted to lower case.
Description
The toLowerCase() method returns the string converted to lower case. It's often used to make comparisons case-insensitive. For languages with special rules, such as Turkish dotted and dotless i, use toLocaleLowerCase() with a locale.
Lower-casing uses Unicode's default rules, which work for most languages. Some characters change in special ways; for example the Greek capital sigma becomes "ς" at the end of a word and "σ" elsewhere. For locale-specific rules, toLocaleLowerCase('tr') converts the Turkish dotted capital İ correctly.
For case-insensitive searching and sorting, converting both strings is the simple approach, but localeCompare() or Intl.Collator with sensitivity: 'base' also ignore accents and are more robust across languages.
Syntax
string.toLowerCase()Return Value
A new string converted to lower case.
Example
Browser Support
The following information will show you the current browser support for the String.prototype.toLowerCase() method. Hover over a browser icon to see the version that first introduced support for this method.
Desktop





Tablets & Mobile





