Home › Guides › camelCase vs PascalCase vs Title Case Explained
“Case” is how a piece of text is capitalised and how its words are joined. In everyday writing it decides how a headline looks. In programming it is a convention that makes names consistent and readable. This guide explains what camelCase, PascalCase, snake_case, kebab-case, Title Case and the rest actually mean, which style different languages and style guides expect, and the edge cases (acronyms, accents and other alphabets) that catch out converters.
Here is the same three-word phrase, “user account ID”, converted into each style by the Case Converter:

| Style | Result | Typical use |
|---|---|---|
| UPPER CASE | USER ACCOUNT ID | Short labels, acronyms |
| lower case | user account id | Normalising data before comparing it |
| Sentence case | User account ID | Headings and interface text in many modern style guides |
| Title Case | User Account ID | Headlines and titles |
| camelCase | userAccountId | Variables and functions in JavaScript, Java, Swift |
| PascalCase | UserAccountId | Class, type and component names |
| snake_case | user_account_id | Python, Ruby, Rust, database columns |
| CONSTANT_CASE | USER_ACCOUNT_ID | Constants and environment variables |
| kebab-case | user-account-id | URLs, CSS class names, file names |
| Train-Case | User-Account-Id | HTTP header names |
| dot.case | user.account.id | Configuration keys |
In the programming styles the acronym “ID” becomes Id. That is a real convention rather than an error, and it is covered in the acronyms section below.
There is no single rule for which words to capitalise in a title. The major guides disagree on the details:
| Guide | Approach to headlines and titles |
|---|---|
| AP (Associated Press) | Headlines use sentence-style capitalisation: only the first word and proper nouns |
| Chicago | Headline style: capitalise major words; lower-case articles, coordinating conjunctions and prepositions regardless of length |
| APA | Title case for titles and main headings, capitalising words of four letters or more, including prepositions and conjunctions; sentence case for titles in reference lists |
| MLA | Capitalise first and last words and principal words; lower-case articles, prepositions and coordinating conjunctions |
If your title has to follow a specific guide, check the converter’s output against that guide’s rules. Automated Title Case follows a general rule and cannot know your publication’s preferences.
Names in code cannot contain spaces, so words are joined in a consistent way. Conventions differ by language:
| Language or place | Variables and functions | Types and classes | Constants |
|---|---|---|---|
| JavaScript / TypeScript | camelCase | PascalCase | UPPER_SNAKE_CASE |
| Python (PEP 8) | snake_case | PascalCase | UPPER_SNAKE_CASE |
| Java | camelCase | PascalCase | UPPER_SNAKE_CASE |
| C# | camelCase for locals, PascalCase for methods and properties | PascalCase | PascalCase |
| Go | MixedCaps; a leading capital exports the name | MixedCaps | MixedCaps |
| Rust | snake_case | PascalCase | SCREAMING_SNAKE_CASE |
| Ruby | snake_case | PascalCase | UPPER_SNAKE_CASE |
| CSS and HTML | kebab-case for class names, ids and custom properties (--main-color) | ||
| SQL | snake_case is common for table and column names; keywords are often written in upper case | ||
| URLs and file names | lower-case kebab-case; Google’s guidance recommends hyphens to separate words in URLs | ||
| Environment variables | UPPER_SNAKE_CASE | ||
These are conventions, not laws, and a project’s own style guide wins. JSON keys are a good example of variety: JavaScript-oriented APIs usually use camelCase, while Python and Ruby APIs often use snake_case.
If you are choosing a naming style for code, you rarely get to pick freely. The usual rule is to follow the convention of the language and the project you are working in. In outline:
When the language gives no guidance, pick one style per kind of name and keep to it. A mixed codebase is harder to read and search than one with an imperfect but consistent convention. These naming conventions apply to names written in code; for headings and titles, see the Title Case and Sentence case rows in the table above.
Mixed styles make code harder to read and cause real bugs, because many systems treat userId and userid as different names. For web addresses, hyphens are the safest choice: they are widely treated as word separators, while underscores tend to join words together. Choose one style per kind of name in a project and keep to it.
Converting a long list of names by hand is slow and error-prone. Paste text into the Case Converter and click the style you want. For the programming styles it works out the words from spaces, punctuation and existing capital letters, so “User Account-ID”, userAccountId and user_account_id all become the same words in the new style. With one name per line and “convert each line separately” ticked, each line is converted on its own.
Id by convention (userId); some teams prefer userID, so pick one rule and stick to it.version2Update can be split in different places by different tools, so check the result.ß becomes SS, and in Turkish the dotted and dotless i have their own upper-case forms (İ and I). A general-purpose converter uses default rules and does not apply language-specific ones, so review the output of text in those languages.camelCase joins words with no separator, writing the first word in lower case and capitalising the first letter of each following word, as in userAccountId. It is the usual style for variables and functions in JavaScript and Java.
In PascalCase the first word is capitalised too (UserAccountId), whereas camelCase starts with a lower-case letter (userAccountId). PascalCase is common for class and component names.
snake_case is standard in Python, Ruby and Rust and is common for database columns. kebab-case is common for URLs, CSS class names and file names because hyphens are treated as word separators.
Capitalize Each Word makes every word start with a capital. Title Case leaves small words such as “a”, “of” and “the” in lower case unless they start or end the title, following headline conventions.
Paste it into the Case Converter and click the style. Words are detected from spaces, punctuation and existing capital letters, so you can paste a phrase or a list of existing names.