Case Converter
Convert letter case and switch between camelCase, snake_case and kebab-case
About this tool
The case converter handles letter case and naming conventions, the everyday work of turning variable names, constants and CSS classes into the style a project expects:
- UPPER CASE: every letter capitalised, common for constants such as
MAX_SIZE - lower case: everything in lowercase
- Title Case: the first letter of each word capitalised, common in headings
- camelCase: first word lowercase, later words capitalised, as in
userName, the usual style for JavaScript and Java variables - PascalCase: every word capitalised, as in
UserController, the usual style for class names - snake_case: words joined by underscores, as in
user_name, common in Python and PHP - kebab-case: words joined by hyphens, as in
user-name, common for CSS classes and URLs
When to use it
- Moving a name between language conventions, such as Java camelCase to Python snake_case
- Converting database column names to code variable names and back
- Normalising CSS class names
- Keeping API field names consistent
Naming reference
| Convention | Example | Common use |
|---|---|---|
| camelCase | userName | JavaScript and Java variables |
| PascalCase | UserController | Java and C# class names |
| snake_case | user_name | Python, PHP and SQL |
| kebab-case | user-name | CSS classes and URLs |