Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

TypeScript · Type Alias

Uncapitalize

Uncapitalize is a built-in intrinsic type that converts the first character of a string type to lowercase. The rest of the string remains unchanged.

Since
4.1

How it works

Uncapitalize is a built-in intrinsic string manipulation type that transforms the first character of a string type to its lowercase equivalent while leaving the remaining characters unchanged. Its behavior uses JavaScript string operations and is not locale-aware.

Syntax

Uncapitalize<StringType>

Parameters

NameTypeDescription
StringTypestring typeThe string type whose first character is transformed to lowercase.

Returns

A string type with its first character converted to lowercase.

Key points

  • Uncapitalize changes the first character of a string type to its lowercase equivalent.
  • It is compiler-provided rather than a type alias declared in the standard declaration files.
  • For "HELLO WORLD", the resulting type is the literal "hELLO WORLD".
  • Unlike Lowercase, Uncapitalize affects only the first character.

Common mistakes

  • Its casing behavior is not locale-aware, so do not use it when locale-sensitive casing rules are required.

Example: Lower the first character

type UppercaseGreeting = "HELLO WORLD";
type LowercaseGreeting = Uncapitalize<UppercaseGreeting>;

const greeting: LowercaseGreeting = "hELLO WORLD";
console.log(greeting);

Uncapitalize lowers only the first character of the string literal type.

When to use it

String literal transformation

Derive a lowercase-leading string literal type from an uppercase or capitalized literal.

Template-literal type composition

Compose casing transformations with template literal types when generating related compile-time string forms.

Interview questions

QWhat does Uncapitalize do?

Uncapitalize<StringType> converts the first character of StringType to a lowercase equivalent. It does not lowercase the rest of the string.

Follow-up: What happens to the remaining characters? They are preserved unchanged; only the first character is transformed.

QWhere is Uncapitalize implemented?

It is an intrinsic type built into the TypeScript compiler for string manipulation. These intrinsic types are not declared in the TypeScript library .d.ts files.

Follow-up: Why are they compiler intrinsics? The documentation says they are built into the compiler for performance.

QWhat type does Uncapitalize<"HELLO WORLD"> produce?

For an input such as "HELLO WORLD", Uncapitalize produces "hELLO WORLD". This makes it useful for deriving related string literal types without runtime code.

Follow-up: How does its behavior differ from Lowercase? Lowercase transforms every character, whereas Uncapitalize changes only the first character.

  • Uppercase
  • Lowercase
  • Capitalize
  • Template Literal Types

Source: Documentation - Template Literal Types | TypeScript. Checked 2026-10-15.