---
title: String.prototype.toUpperCase
localeTitle: String.prototype.toUpperCase
---
O método JavaScript `.toUpperCase()` retorna a mesma string que foi chamada, mas em maiúsculas.

**Sintaxe**
```
str.toUpperCase() 
```

## Exemplos
```
console.log("hello world".toUpperCase()); // Console will output "HELLO WORLD" 
```

[MDN de](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase) origem