JavaScript String toUpperCase()
Example
Convert to uppercase:
let text = "Hello World!";
let result = text.toUpperCase();
Try it Yourself »
Description
The toUpperCase()
method converts a string to uppercase letters.
The toUpperCase()
method does not change the original string.
Syntax
string.toUpperCase()
Parameters
NONE |
Return Value
Type | Description |
A string | The string converted to uppercase. |
Browser Support
toUpperCase()
is an ECMAScript1 (JavaScript 1997) feature.
It is supported in all browsers:
Chrome | Edge | Firefox | Safari | Opera | IE |
Yes | Yes | Yes | Yes | Yes | Yes |