PascalCase converter
PascalCase capitalises every word including the first and removes the separators: ParseXmlFile, UserAccount, HttpClient. It is also called UpperCamelCase, and in most of the languages that use it, it marks a type — a class, an interface, a struct, an enum — as distinct from a variable in camelCase.
Go gives the capital letter real teeth. An identifier starting with an uppercase letter is exported from its package; a lowercase one is not. That is not a convention a linter enforces but a rule the compiler applies, and it is why generated Go structs from a JSON payload always have exported PascalCase fields with a json tag pointing back at the original key — encoding/json cannot see unexported fields at all.
C# uses PascalCase more broadly than most: public properties, methods, classes, namespaces and even public fields, with camelCase reserved for locals and parameters. .NET’s own naming guidelines also make the acronym call explicitly — two-letter acronyms stay fully capitalised (IOStream), longer ones are treated as words (HtmlParser), which is the most precisely specified answer anyone gives to this question.
PascalCase — worked through
Every line below is produced by the same converter that runs on this page, so the example and the tool cannot disagree.
| Input | PascalCase | Note |
|---|---|---|
| parse xml file | ParseXmlFile | The canonical shape of this style. |
| parse the XML file from the ERP API | ParseTheXMLFileFromTheErpAPI | Acronym preservation on — the converter’s default. |
| parse the XML file from the ERP API | ParseTheXmlFileFromTheErpApi | Acronym list off — the “treat acronyms as ordinary words” convention. |
Where PascalCase is the convention
| Ecosystem | What it applies to |
|---|---|
Go | Not a style but an access rule: an exported identifier must begin with a capital. Struct fields serialised to JSON must be PascalCase for encoding/json to see them. |
C# | Classes, methods, properties, namespaces and public fields. Locals and parameters stay camelCase, so the two styles appear within a single method by design. |
TypeScript / Java | Types, classes, interfaces and enums — the visual counterpart to camelCase values. React components are PascalCase because JSX uses the capital letter to distinguish a component from an HTML element. |
Rust | Types, traits and enum variants (snake_case for functions and variables). rustc warns about a type that is not PascalCase, so the compiler nudges you into it. |
The acronym trap
HTTPClient, HttpClient or HTTPClient? The .NET guidelines are the most explicit anyone has been: fully capitalise two-letter acronyms (IOStream, DbIO), treat three or more letters as a word (HtmlParser, XmlReader). Go’s own conventions go the other way — the standard library has ServeHTTP and URL, and golint historically insisted on it. React components inherit whatever their author chose. Set the rule per project; the converter’s acronym list makes it reproducible.
مرحبا بالعالم. The Unicode slug keeps the original script.FAQ
Is PascalCase the same as UpperCamelCase?
Yes, two names for one style: every word capitalised, no separators. “camelCase” unqualified almost always means the lower variant, so the two names exist to remove that ambiguity.
Why must Go struct fields be PascalCase?
Because the capital letter is what exports an identifier from its package, and encoding/json can only marshal exported fields. A lowercase field is silently skipped — the JSON simply comes out without it.
When should I use PascalCase over camelCase?
For types and classes in most languages, and for anything exported in Go. The convention exists so a reader can tell a type from a value at a glance without looking up the declaration.