Case Converter
Convert text between camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, Title Case, and Sentence case.
Case conventions in code
Naming conventions vary across languages and ecosystems. JavaScript and Java use camelCase for variables and functions, PascalCase for classes and React components. Python and Rust prefer snake_case for variables and functions and PascalCase for types. Cascading style sheets, HTML attributes, and URL slugs use kebab-case. Environment variables and constants are conventionally CONSTANT_CASE in nearly every ecosystem.
Switching between conventions by hand is error-prone — especially when the source has acronyms or numbers. This tool tokenises your input into individual words by detecting word boundaries (whitespace, separators, and capital-letter transitions) and then reassembles the words in the target style. Acronyms are preserved in PascalCase output and lowercased in camelCase output, matching the behaviour of popular libraries such as lodash and change-case.
Use cases
- Rename a TypeScript identifier from snake_case (returned by a Python API) to camelCase before assignment.
- Generate a kebab-case URL slug from a human-readable title.
- Convert a column list from a SQL CREATE TABLE statement into TypeScript interface keys.
- Translate a CONSTANT_CASE feature flag name into a sentence-cased label.
- Bulk rename test fixtures so they conform to your project's style.
Best practices
- Pick a convention per layer (database, API, UI) and stick to it; convert at the boundary.
- Keep acronyms uppercase in PascalCase (e.g. JSONParser) only if the surrounding code does so consistently.
- Avoid mixing styles in a single file — readers infer meaning from convention.
- When generating slugs, also strip diacritics and limit length to 60 characters for SEO friendliness.