Case Converter
Convert text between camelCase, PascalCase, snake_case, kebab-case, UPPERCASE, and lowercase naming conventions
Type or paste text — all case conversions appear instantly below
What is a Case Converter?
A case converter transforms text between different naming conventions used in programming. Each language and framework has its own conventions for naming variables, functions, classes, and constants — and switching between them manually is tedious and error-prone.
How to Use
- Type or paste any text into the input field
- All six case conversions appear instantly as you type
- Click "Copy" next to any output to copy it to your clipboard
Naming Conventions by Language
Different programming languages follow different conventions:
- JavaScript/TypeScript: camelCase for variables and functions, PascalCase for classes and components
- Python: snake_case for variables, functions, and modules; PascalCase for classes; UPPERCASE for constants
- Ruby: snake_case for methods and variables; PascalCase for classes and modules; SCREAMING_SNAKE_CASE for constants
- CSS/HTML: kebab-case for class names, IDs, and custom properties
- Rust: snake_case for functions and variables; PascalCase for types; SCREAMING_SNAKE_CASE for constants
- Go: camelCase for private, PascalCase for exported identifiers
- Java/C#: camelCase for variables and parameters; PascalCase for classes, methods, and properties
Examples
Input: "get user profile"
- camelCase:
getUserProfile - PascalCase:
GetUserProfile - snake_case:
get_user_profile - kebab-case:
get-user-profile - UPPERCASE:
GET_USER_PROFILE - lowercase:
get user profile
Input: "XMLHttpRequest"
- camelCase:
xmlHttpRequest - PascalCase:
XmlHttpRequest - snake_case:
xml_http_request - kebab-case:
xml-http-request - UPPERCASE:
XML_HTTP_REQUEST - lowercase:
xml http request
Word Boundary Detection
The converter uses intelligent word boundary detection that handles multiple input formats:
- Delimiters: Spaces, underscores, and hyphens are recognized as word separators
- camelCase boundaries: Transitions from lowercase to uppercase split words (e.g., "myVar" → "my", "Var")
- Acronym detection: Sequences of uppercase letters followed by lowercase are split at the boundary (e.g., "XMLParser" → "XML", "Parser")
When to Use Each Convention
| Convention | Use Case | Example |
|---|---|---|
| camelCase | JS/TS variables, JSON keys | firstName |
| PascalCase | Classes, React components, types | UserProfile |
| snake_case | Python, Ruby, databases | first_name |
| kebab-case | CSS, URLs, HTML attributes | first-name |
| UPPERCASE | Constants, environment vars | MAX_RETRIES |
| lowercase | Filenames, package names | my package |
Frequently Asked Questions
What is the difference between camelCase and PascalCase?
camelCase starts with a lowercase letter and capitalizes the first letter of each subsequent word (e.g., myVariableName). PascalCase capitalizes the first letter of every word including the first one (e.g., MyVariableName). In most languages, camelCase is used for variables and functions, while PascalCase is used for class names and type definitions.
When should I use snake_case vs kebab-case?
snake_case is common in Python, Ruby, Rust, and SQL — it uses underscores to separate words (e.g., my_variable_name). kebab-case uses hyphens and is standard in CSS properties, HTML attributes, and URL slugs (e.g., my-component-name). The choice depends on your language and framework conventions.
How does the tool detect word boundaries?
The converter detects word boundaries using three strategies: explicit delimiters (spaces, underscores, hyphens), camelCase transitions (lowercase-to-uppercase), and acronym boundaries (uppercase sequences followed by lowercase). This means inputs like "getHTTPResponse", "get_http_response", and "get-http-response" are all correctly split into the words: get, HTTP, response.
Does this tool handle acronyms correctly?
Yes. The converter preserves and detects acronyms. For example, "XMLParser" is split into "XML" and "Parser", so converting to snake_case produces "xml_parser" rather than "x_m_l_parser". Similarly, "getHTTPSUrl" correctly splits into "get", "HTTPS", and "Url".
Is my text sent to any server?
No. All case conversion happens entirely in your browser using client-side JavaScript. Your text never leaves your device, ensuring complete privacy for sensitive variable names or proprietary code.