---
title: String.prototype.toUpperCase
---
The JavaScript method `.toUpperCase()` returns the same string it was called on, but in all upper case.

**Syntax**

    str.toUpperCase()

## Examples

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

Source <a href='https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/toUpperCase' target='_blank' rel='nofollow'>MDN</a>