About Case
Which case is which
camelCase for JavaScript variables, PascalCase for types and components, snake_case for Python and SQL columns, kebab-case for URLs, CSS and file names, SCREAMING_SNAKE for constants and environment variables.
Title Case is the odd one out: it is for prose, and every style guide disagrees about which small words stay lowercase.
Where the words are split
Converting is mostly deciding where one word ends. Spaces, underscores, hyphens and dots all separate; so does a lowercase letter followed by an uppercase one, which is what lets parseHTTPResponse come apart correctly.
Runs of capitals are treated as one word until the last capital that starts a new one — HTTPServer is HTTP + Server, not eleven letters.
Common questions
- What happens to acronyms like ID or URL?
- They are kept as one word when splitting, then cased like any other: URL becomes url in snake_case and Url in PascalCase. If a codebase writes parseURL rather than parseUrl, that is a house style no converter can infer.
- Does it keep punctuation and numbers?
- Digits stay where they are and start a new word when they follow a letter. Other punctuation is treated as a separator and does not survive the conversion.
- Why does Title Case leave some words lowercase?
- It follows the common convention of lowercasing short articles, conjunctions and prepositions inside the string, while always capitalising the first word. Style guides differ here, so check the result against whichever you follow.