Case Converter: Transform Text Between Any Case Format
Instantly convert text between camelCase, snake_case, PascalCase, kebab-case, CONSTANT_CASE, and 15+ other formats. This tool automatically detects your input format and shows all conversions at once, so you can quickly copy the format you need.
Perfect for developers switching between different naming conventions. Paste a variable name, function name, or any text, and get instant conversions for JavaScript, Python, CSS, databases, and more. 100% client-side - your data never leaves your browser.
Text Cases
What is Case Conversion?
Case conversion transforms text between different naming conventions used in programming and writing. Different languages, frameworks, and contexts use different case styles for variable names, class names, file names, and more. Converting between them manually is tedious and error-prone, so this tool does it instantly and accurately.
Programming Case Styles Explained
camelCase
Used in: JavaScript, TypeScript, Java methods
Examples: getUserName,
firstName,
isActive
Rule: First word lowercase, subsequent words capitalized, no separators.
PascalCase (UpperCamelCase)
Used in: C#, React components, classes in most languages
Examples: UserAccount,
HttpClient,
MyComponent
Rule: Every word capitalized, no separators.
snake_case
Used in: Python, Ruby, Rust, database columns
Examples: user_name,
get_user_data,
is_active
Rule: All lowercase, words separated by underscores.
CONSTANT_CASE (SCREAMING_SNAKE_CASE)
Used in: Constants, environment variables
Examples: MAX_SIZE,
API_KEY,
DATABASE_URL
Rule: All uppercase, words separated by underscores.
kebab-case
Used in: CSS classes, URLs, HTML attributes, CLI flags
Examples: user-profile,
nav-item,
--output-dir
Rule: All lowercase, words separated by hyphens.
When to Use Each Case
- JavaScript variables: camelCase
- React components: PascalCase
- Python functions: snake_case
- CSS classes: kebab-case
- Environment variables: CONSTANT_CASE
- URLs and slugs: kebab-case
- Database columns: snake_case
- HTTP headers: Train-Case
Features
- Real-time conversion as you type
- Automatic input format detection
- 15+ case formats supported
- Multi-line text processing
- One-click copy for any format
- Copy all formats at once
- 100% client-side - data stays in your browser
Frequently Asked Questions
What's the difference between camelCase and PascalCase? +
camelCase starts with a lowercase letter and capitalizes subsequent words (e.g., 'getUserName'), while PascalCase capitalizes every word including the first (e.g., 'GetUserName'). camelCase is typically used for variables and functions in JavaScript/TypeScript, while PascalCase is used for class names and React components.
Which case style should I use for JavaScript? +
In JavaScript, use camelCase for variables, functions, and object properties (e.g., 'firstName', 'getUserData'). Use PascalCase for classes and React components (e.g., 'UserProfile', 'MyComponent'). Use CONSTANT_CASE for constants (e.g., 'MAX_SIZE', 'API_KEY').
How do I convert snake_case to camelCase? +
Simply paste your snake_case text (like 'user_account_settings') into the input field. The tool automatically detects the format and shows the camelCase conversion (userAccountSettings) along with all other formats instantly.
What is kebab-case used for? +
kebab-case (words separated by hyphens, all lowercase) is primarily used for CSS class names (e.g., 'nav-item', 'btn-primary'), URL slugs (e.g., '/user-profile'), HTML attributes, and CLI flags (e.g., '--output-dir'). It's readable and URL-safe.
Why do different languages use different case styles? +
Different case styles evolved based on language conventions and community preferences. Python prefers snake_case for readability, JavaScript uses camelCase to match its C-family syntax, and CSS uses kebab-case because underscores weren't originally allowed in class names. Following these conventions makes code more readable and consistent.
Can I convert multiple lines at once? +
Yes! This tool processes each line separately and preserves line breaks in the output. This is useful for converting lists of variable names or multiple text strings at once.