Case Converter
camelCase
snake_case
kebab-case
PascalCase
Convert text between UPPERCASE, lowercase, Title Case, camelCase, snake_case, kebab-case, PascalCase, and CONSTANT_CASE instantly.
How to Use Case Converter
- Select the target case type from the dropdown.
- Type or paste your text in the input area.
- The converted result appears instantly in the output area.
- Click "Copy" to copy the result to your clipboard.
What is Case Conversion?
Case conversion transforms text between different capitalization styles and naming conventions used in programming. Different languages, frameworks, and contexts follow different conventions for naming variables, functions, classes, and files. Converting between these formats manually is tedious and error-prone. This tool instantly transforms text between camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title Case, Sentence case, and more, saving time and reducing the risk of inconsistencies in your code.
How Case Conversion Works
The conversion process first identifies word boundaries in the input text. In camelCase or PascalCase, boundaries are detected at uppercase letter transitions. In snake_case and kebab-case, boundaries are the underscore or hyphen separators. In plain text, spaces serve as boundaries. Once the individual words are extracted, they are reassembled according to the target format's rules. For example, converting "user_first_name" to camelCase joins the words with no separator and capitalizes the first letter of each word except the first, producing "userFirstName". The same input converted to PascalCase capitalizes every word, giving "UserFirstName".
Common Use Cases
- Converting API response field names between JavaScript (camelCase) and Python (snake_case)
- Transforming database column names to match application-level variable conventions
- Generating CSS class names (kebab-case) from component names (PascalCase)
- Creating constant names (CONSTANT_CASE) from descriptive labels
- Converting file names between different project naming conventions
- Formatting text for titles, headings, and display labels
Naming Conventions by Language
Each programming language has established conventions that the community follows. JavaScript and TypeScript use camelCase for variables and functions, PascalCase for classes and React components, and CONSTANT_CASE for constants. Python follows PEP 8, which prescribes snake_case for variables, functions, and methods, PascalCase for classes, and CONSTANT_CASE for module-level constants. Ruby uses snake_case for methods and variables, PascalCase for classes, and SCREAMING_SNAKE_CASE for constants. CSS uses kebab-case for class names and property names. Go uses camelCase for unexported identifiers and PascalCase for exported ones.
When working on full-stack projects, you frequently need to convert between these conventions. A JSON API might return user_name from a Python backend, but your React frontend expects userName. Database columns in PostgreSQL often use snake_case, while the Java or C# models that map to them use PascalCase or camelCase. Understanding and consistently applying these conventions improves code readability and makes collaboration easier across teams and codebases.
For counting words and characters in your text, use our Word Counter. To test text patterns, try the Regex Tester. You can also compare text differences with the Diff Checker.