JavaScript String toUpperCase() Method
Example
Convert the string to uppercase letters:
let str = "Hello World!";
str.toUpperCase() // Returns "HELLO WORLD!"
Try it Yourself »
Definition and Usage
The toUpperCase() method converts a string to uppercase letters.
The toUpperCase() method does not change the original string.
Tip: Use the The toLowerCase()
method to convert a string to lowercase.
Browser Support
toUpperCase() is fully supported in all browsers:
| Chrome | IE | Edge | Firefox | Safari | Opera |
| Yes | Yes | Yes | Yes | Yes | Yes |
Syntax
string.toUpperCase()
Parameters
| None. |
Technical Details
| Return Value: | A String, representing the value of a string converted to uppercase |
|---|---|
| JavaScript Version: | ECMAScript 1 |

