Case Format Converter
Convert text between camelCase, PascalCase, snake_case, kebab-case, and more
Usage Tips
- Use camelCase for JavaScript/TypeScript variable names
- Use PascalCase for React components and class names
- Use snake_case for Python variables and file names
- Use kebab-case for CSS classes and HTML attributes
- Use SCREAMING_SNAKE_CASE for constants and environment variables
- Use Train-Case for some documentation systems and CSS frameworks
- Use Title Case for article titles and UI headings
- Use Path/case for file system organization and URL routing
- Use Space Case for readable text displayed to users
- When converting between formats, check the output especially for acronyms and special characters
Related Tools
About Case Format Conversion
Case Format Types
- camelCase: First word lowercase, remaining words capitalized
- PascalCase: All words capitalized, no separators
- snake_case: All lowercase with underscores
- kebab-case: All lowercase with hyphens
- SCREAMING_SNAKE_CASE: All uppercase with underscores
- dot.case: All lowercase with dots
- Train-Case: Words capitalized with hyphens
- Title Case: Words capitalized with spaces
- lowercase: All lowercase with no separators
- UPPERCASE: All uppercase with no separators
- Path/case: All lowercase with forward slashes
- Space Case: All lowercase with spaces
Common Use Cases
- camelCase: Variables in JavaScript, Java, TypeScript
- PascalCase: Classes in OOP languages, React components
- snake_case: Python, Ruby, and SQL variables
- kebab-case: HTML attributes, CSS classes, URLs
- SCREAMING_SNAKE_CASE: Constants and environment variables
- dot.case: Namespaces and package names
- Train-Case: Documentation headings and some CSS frameworks
- Title Case: UI labels, article titles, headings
- lowercase: Minimalist config files, simplified CSS classes
- UPPERCASE: Acronyms, abbreviations, shortcodes
- Path/case: File system structures, routing paths
- Space Case: Human-readable labels, display text
Frequently Asked Questions
What is the difference between camelCase and PascalCase?
camelCase starts with a lowercase letter (e.g., "myVariableName"), while PascalCase starts with an uppercase letter (e.g., "MyClassName"). camelCase is commonly used for variables and functions, while PascalCase is used for class names and React components.
When should I use snake_case versus kebab-case?
Use snake_case for programming languages like Python, Ruby, and SQL where underscores are the standard naming convention. Use kebab-case for web development contexts like CSS class names, HTML attributes, URLs, and file names where hyphens are preferred.
What is SCREAMING_SNAKE_CASE used for?
SCREAMING_SNAKE_CASE (all uppercase with underscores) is primarily used for constants, environment variables, and configuration values that shouldn't change during program execution. It makes these important values easily identifiable in code.
Can this tool handle mixed input formats correctly?
Yes, the tool is designed to intelligently detect word boundaries regardless of the input format. It can convert from any supported case format to any other, handling mixed inputs, acronyms, numbers, and special characters appropriately.
What is dot.case and where is it used?
dot.case uses dots as separators between words (e.g., "namespace.component.name"). It's commonly used in package names, namespaces in programming languages, configuration file keys, and API endpoint naming conventions.
How does the tool handle acronyms and abbreviations?
The tool attempts to preserve the meaning of acronyms while applying the selected case format. However, complex acronyms may require manual review of the output to ensure they maintain their intended meaning and readability.
What's the difference between Title Case and Train-Case?
Title Case uses spaces between capitalized words (e.g., "My Component Name") and is used for headings and labels. Train-Case uses hyphens between capitalized words (e.g., "My-Component-Name") and is used in some CSS frameworks and documentation systems.
Can I convert multiple lines of text at once?
Yes, you can paste multiple lines of text into the input area. The tool will apply the selected case conversion to each line independently, making it easy to convert lists of variable names, function names, or other text elements.
Which programming languages use which case formats?
JavaScript/TypeScript: camelCase (variables), PascalCase (classes). Python: snake_case. Java: camelCase (variables), PascalCase (classes). C++: varies, often snake_case. CSS: kebab-case. Constants in most languages: SCREAMING_SNAKE_CASE. The tool helps you convert between these conventions when working across languages.
What is Path/case used for?
Path/case uses forward slashes as separators (e.g., "my/component/name") and is commonly used for file system organization, URL routing structures, API endpoint paths, and hierarchical naming systems where a path-like structure is beneficial.
How accurate is the conversion for complex text?
The tool uses sophisticated algorithms with regular expressions to handle most text correctly, including mixed formats, numbers, and special characters. However, very complex inputs with unusual formatting may benefit from manual review to ensure the output meets your specific requirements.
Can I use this tool for database field names?
Absolutely! This tool is excellent for converting between programming variable names (often camelCase) and database field names (often snake_case). It helps maintain consistency when working with APIs that need to map between frontend and backend naming conventions.