JavaScript .toLowerCase()
Published Jun 19, 2021Updated Jan 9, 2024
Contribute to Docs
The .toLowerCase() method converts a string to lowercase letters in JavaScript.
Syntax
string.toLowerCase();
Example 1
Converting uppercase letters to lowercase letters:
console.log('HELLO WORLD'.toLowerCase());// Output: hello world
Example 2
Don’t forget that .toLowerCase() doesn’t change the original string.
Codebyte Example
The .toLowerCase() method will convert upper-case alphabet characters to lower-case in a string with other character types such as digits and special characters. Use the below code block to try the method:
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn JavaScript on Codecademy
- Front-end engineers work closely with designers to make websites beautiful, functional, and fast.
- Includes 34 Courses
- With Professional Certification
- Beginner Friendly.115 hours
- Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.
- Beginner Friendly.15 hours