# `Uppercase<StringType>`

> The `Uppercase<StringType>` utility type in TypeScript converts each character of a string literal type to uppercase.

## How do I convert a string type to uppercase in TypeScript?

The intrinsic string manipulation type that converts every character of a string literal type to uppercase. Often used with template literal types to generate keys like 'GET_USER'.

- Topic: Utility Types
- Type: utility type

## Example

Wrong:

```ts
type Method = 'get' | 'post';
type MethodConst = 'GET' | 'POST';
```

Right:

```ts
type Method = 'get' | 'post';
type MethodConst = Uppercase<Method>;
```

The uppercase union is derived from the source, so a new method appears in both types at once.

## Key points

- The runtime value is also converted with `toUpperCase()`, the type alone does not change the string.
- The input is a literal or template literal type, a plain `string` stays `string`.

## Interview questions

### Does Uppercase change the string at runtime?

No, it only transforms the type. Call `toUpperCase()` on the value and the type stays in sync.

### Can I use Uppercase inside a template literal type?

Yes, e.g. `` `ON_${Uppercase`<Event>`}` `` turns 'click' into 'ON_CLICK'.

## Related cards

- [`Lowercase<StringType>`](https://wonderium.dev/ts/lowercase.md)
- [`Capitalize<StringType>`](https://wonderium.dev/ts/capitalize.md)
- [Template Literal Types](https://wonderium.dev/ts/template-literal-types.md)
- [Literal Types](https://wonderium.dev/ts/literal-types.md)
- [.toUpperCase()](https://wonderium.dev/js/string-to-upper-case.md)

---

- Level: [TypeScript](https://wonderium.dev/ts.md)
- HTML version: https://wonderium.dev/ts/uppercase
- Last updated: 2026-11-25
