Skip to content

Pascal case

Pascal case is a naming convention that forms an identifier by joining words without separators and capitalizing the first letter of every word, including the first, as in HttpRequest or BinarySearchTree.

The style is also called upper camel case or, in the Python community, CapWords or CapitalizedWords. Its name references the Pascal programming language, and Microsoft’s .NET design guidelines later helped popularize it.

Pascal case differs from camel case, or lower camel case, only in its first letter. Camel case starts lowercase, as in httpRequest, while snake case separates words with underscores, as in http_request. All three carry the same words in the same order and vary only in how they mark the boundaries between them.

The interactive comparison below renders any phrase in all three styles at once, highlighting how each marks the word boundaries while the words themselves stay fixed:

Interactive diagram — enable JavaScript to view.

Many languages reserve Pascal case for names that denote a type rather than an ordinary value:

  • Types and classes in most object-oriented languages, including C#, Java, and Swift.
  • Public methods and properties in .NET, which applies the style to members as well as types.
  • Components in UI frameworks such as React, where the leading capital sets a custom component apart from a built-in element.

In Python, PEP 8 prescribes CapWords for class names, exception names, and type variables, while functions and variables use snake case. When an identifier holds an acronym, PEP 8 keeps every letter capitalized, so it writes HTTPServerError rather than HttpServerError.

How to Write Beautiful Python Code With PEP 8

Tutorial

How to Write Beautiful Python Code With PEP 8

Learn how to write high-quality, readable code by using the Python style guidelines laid out in PEP 8. Following these guidelines helps you make a great impression when sharing your work with potential employers and collaborators.

intermediate best-practices

For additional information on related topics, take a look at the following resources:


By Martin Breuss • Updated Sept. 3, 2026