JavaScript (ES2026) reference · String Methods

JavaScript String toUpperCase() Method

Return the string converted to uppercase letters. Use toLocaleUpperCase() for language-specific rules.

JavaScript (ES2026) Since ES1

Create a free account to save this page, take notes and track your progress. Sign in

Syntax

string.toUpperCase()

Return value

A new string.

Examples

UppercaseTry it yourself
console.log("ready camel".toUpperCase());

Output

READY CAMEL
Capitalize the first letterTry it yourself
const capitalize = (s) => s.charAt(0).toUpperCase() + s.slice(1);
console.log(capitalize("javaScript"));

Output

JavaScript

Version history

VersionChange
JavaScript ES1Added

In other languages

Was this page helpful?