Text Case Converter — When to Use Each Case Style
Learn the difference between uppercase, lowercase, title case, camelCase, snake_case, and more. Convert text case with our free online tool.
Naming things is hard. Naming them in the right case is harder. I've seen codebases where the same developer used camelCase, snake_case, and kebab-case in the same file — all for variables. Picking a case style and sticking to it saves everyone time.
The Cases That Actually Matter
| Style | Example | Where you'll see it |
|---|---|---|
| camelCase | userName | JavaScript variables, Java methods |
| PascalCase | UserService | JS/TS classes, React components, C# types |
| snake_case | user_name | Python, Rust, file names |
| kebab-case | user-name | CSS classes, URL slugs, config keys |
| SCREAMING_SNAKE | MAX_RETRIES | Constants, env vars |
| lowercase | username | URLs, casual text |
| UPPERCASE | USERNAME | Headings, emphasis (rarely in code) |
| Title Case | User Name | Blog titles, button labels |
Why So Many Cases?
Mostly history. C liked lowercase. Java popularized camelCase. Python went with snake_case because it reads more like English. CSS chose kebab-case because hyphens are valid in selectors but camelCase isn't (well, it is now, but nobody uses it).
The conventions stick because consistency within a codebase matters more than which convention you pick.
Case Conversion in Practice
Where you actually need a converter:
- API field mapping — your backend returns snake_case, your frontend wants camelCase
- URL slugs — converting a blog title like "My Post Title" to my-post-title
- Constant extraction — turning defaultTimeout into DEFAULT_TIMEOUT
- CSS class generation — converting component names to kebab-case selectors
I've written these conversions as one-liners too many times. The text case converter on this site handles all the common styles — paste your text, pick the target case, copy the result.