Convert snake_case to PascalCase!

String
Result

Convert 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 snake_case to PascalCase by capitalizing each word and removing the underscores: user_accounts → UserAccounts. The most common source is a database: table names are usually snake_case, while the ORM entity or model class that maps to them is PascalCase.

It also helps with Protobuf and GraphQL schemas, Rust and Go type names derived from snake_case identifiers, and Python modules whose main class shares the module's name.

How to use

  1. Pick snake_case on the left and PascalCase on the right.
  2. Paste your CREATE TABLE statements, table list or names into the String area.
  3. Copy the converted names from Result.

Example

Input (snake_case)
CREATE TABLE order_items (id INT);
CREATE TABLE user_accounts (id INT);
Output (PascalCase)
CREATE TABLE OrderItems (id INT);
CREATE TABLE UserAccounts (id INT);

Both table names become class-style names. Note that the plural is kept (OrderItems); entity classes are usually singular, so rename to OrderItem if that is your convention.

Supported features

  • Capitalizes the first letter and the letter after each underscore: shipping_address → ShippingAddress.
  • SQL keywords like CREATE TABLE and types like INT are not snake_case and stay as written.
  • A leading underscore is dropped rather than kept, since PascalCase names do not start with _.

Use cases

Entity classes for an existing schema

When adding JPA, TypeORM, SQLAlchemy or Prisma models to a database that already exists, convert the table list to get class names, then add @Table(name = "...") or __tablename__ with the original snake_case name.

Type names from API resource names

Resource keys such as payment_intent or line_item in a JSON API map naturally to PaymentIntent and LineItem types in TypeScript, Go or Swift clients.

Notes and limitations

  • No singularization is done. order_items becomes OrderItems, not OrderItem.
  • Digit segments are joined straight on: address_line_2 → AddressLine2.

FAQ

Can it generate the whole entity class?

No, this page only renames identifiers. For full model code from sample data, the JSON → JPA, TypeORM or SQLAlchemy pages generate classes with fields.

What happens to columns in the same paste?

Column names in snake_case are converted too. If you only want table names, paste just those lines.