Convert SCREAMING_SNAKE_CASE to PascalCase!

String
Result

Convert SCREAMING_SNAKE_CASE to PascalCase!

Is the variable naming in the code you copied from somewhere else different from your code? Don't worry! It converts variables to your desired naming convention!

Converts SCREAMING_SNAKE_CASE to PascalCase: PAYMENT_PENDING → PaymentPending. Java enums, C constants and database enum values are usually upper-case with underscores, while TypeScript enums, C# enums, Swift cases and class names use PascalCase.

Paste an enum body or a list of constants when porting it to another language or generating matching type names on the client side.

How to use

  1. Set the first dropdown to SCREAMING_SNAKE_CASE and the second to PascalCase.
  2. Paste the enum constants or constant names into String.
  3. Copy the converted enum members from Result.

Example

Input (SCREAMING_SNAKE_CASE)
public enum OrderStatus {
  PAYMENT_PENDING,
  PAYMENT_DONE,
  SHIPPING_STARTED
}
Output (PascalCase)
public enum OrderStatus {
  PaymentPending,
  PaymentDone,
  ShippingStarted
}

The Java enum constants become PascalCase members suitable for a C# or TypeScript enum. OrderStatus and the public enum keywords are not upper-case-with-underscores, so they are untouched.

Supported features

  • Capitalizes the first letter of each segment and lowercases the rest: SHIPPING_STARTED → ShippingStarted.
  • Removes a leading underscore.
  • Leaves one-word constants (ACTIVE) as they are, because they contain no underscore.

Use cases

Porting a Java enum to C# or TypeScript

C# guidelines use PascalCase for enum members, and many TypeScript codebases do too. Converting the constants and keeping the original value as the string (PaymentPending = "PAYMENT_PENDING") preserves the wire format.

Event or message type names

Message codes like USER_SIGNED_UP in a queue can be turned into UserSignedUp event class names for a handler per message.

Notes and limitations

  • Acronyms are not restored: HTTP_ERROR becomes HttpError, not HTTPError.
  • One-word constants like ACTIVE are skipped; rename them to Active yourself.

FAQ

Will it keep the original string values for me?

No, it only rewrites names. If your API sends "PAYMENT_PENDING", write the enum as PaymentPending = "PAYMENT_PENDING" so serialization still matches.

What about numbers inside names?

Numeric segments are attached directly: HTTP_2_ENABLED → Http2Enabled, and API_V2 → ApiV2.