Home › Text tools › Case Converter
🔧

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

ConventionExampleCommon use
camelCaseuserNameJavaScript and Java variables
PascalCaseUserControllerJava and C# class names
snake_caseuser_namePython, PHP and SQL
kebab-caseuser-nameCSS classes and URLs