🔠 Text Case Converter

Convert text between camelCase, PascalCase, snake_case, kebab-case, and CONSTANT_CASE instantly.

Results

Case Type Result Action
camelCase
PascalCase
snake_case
kebab-case
CONSTANT_CASE

What Are Naming Conventions?

Naming conventions are rules for formatting identifier names (variables, functions, classes, files) in source code. Consistent naming improves code readability, reduces bugs, and makes collaboration easier across teams. Different programming languages and ecosystems have adopted specific conventions as their standards.

Case Styles Explained

StylePatternExampleCommon Use
camelCaseFirst word lowercase, subsequent capitalizedgetUserNameJavaScript variables/functions, Java methods, TypeScript
PascalCaseEvery word capitalizedGetUserNameC# classes/methods, .NET, Java classes, React components
snake_caseWords separated by underscores, all lowercaseget_user_namePython, Ruby, Rust, SQL, file names
kebab-caseWords separated by hyphens, all lowercaseget-user-nameCSS classes, HTML attributes, URL slugs, CLI flags
CONSTANT_CASEAll uppercase with underscoresGET_USER_NAMEConstants, environment variables, macros

How to Use This Tool

  1. Type or paste any text, identifier, or phrase into the input field.
  2. Click Convert to see the text in all five case styles simultaneously.
  3. Click Copy next to the style you need to copy it to your clipboard.

Common Use Cases

  • Cross-language development: Convert a Python snake_case function name to camelCase for a JavaScript API client.
  • API design: Ensure JSON property names follow your team's chosen convention (camelCase for JS clients, snake_case for Python clients).
  • CSS class naming: Convert PascalCase component names to kebab-case for CSS selectors.
  • Database to code mapping: Convert SQL column names (snake_case) to C# property names (PascalCase).
  • Environment variables: Convert config key names to CONSTANT_CASE for environment variables.

Frequently Asked Questions

Follow the conventions of your programming language and team style guide. JavaScript uses camelCase for variables and PascalCase for classes. Python and Ruby use snake_case. C# uses PascalCase for public members and camelCase (with underscore prefix) for private fields. CSS uses kebab-case. Consistency within a project matters more than the specific choice.

Most programming languages interpret the hyphen (-) as a minus operator, so my-variable would be parsed as my minus variable. Kebab-case works in CSS, HTML attributes, file names, and URL slugs because these contexts don't treat hyphens as operators. Lisp/Clojure are notable exceptions that allow hyphens in identifiers.

Title Case (capitalizing every major word) and Sentence case (capitalizing only the first word) are text formatting conventions used in writing, not programming identifiers. This tool focuses on the five most common code naming conventions. For general text formatting, word processors and writing tools are more appropriate.