Case Converter
Convert identifiers and text between camelCase, PascalCase, snake_case, SCREAMING_SNAKE_CASE, kebab-case, Title Case, Sentence case, UPPER and lower case.
Each line is converted separately.
- camelCase
- PascalCase
- snake_case
- SCREAMING_SNAKE_CASE
- kebab-case
- Title Case
- Sentence case
- UPPER CASE
- lower case
- aLtErNaTiNg cAsE
How to convert text case
- 1
Enter text
Type or paste an identifier, a phrase, or one identifier per line.
- 2
Copy the style you need
All case styles update as you type. Click Copy next to the one you want.
Naming conventions by language
Which case where
JavaScript and TypeScript: camelCase for variables and functions, PascalCase for classes, types and React components. Python (PEP 8): snake_case for functions, variables and modules, PascalCase for classes, SCREAMING_SNAKE_CASE for constants. Go: MixedCaps only, and a leading capital exports the name. Rust: snake_case for functions and variables, PascalCase for types and traits, SCREAMING_SNAKE_CASE for constants. Java: PascalCase classes, camelCase methods. C#: PascalCase for classes, methods and properties. SQL columns are usually snake_case, CSS classes and URL slugs kebab-case, environment variables SCREAMING_SNAKE_CASE.
Acronyms
Style guides disagree. Go keeps initialisms in one case (userID, ServeHTTP). Google's Java style treats acronyms as words (XmlHttpRequest). Microsoft's .NET guidelines uppercase two-letter acronyms (IOStream) and treat longer ones as words (HtmlParser). This tool always writes acronyms as plain words in camelCase and PascalCase, so check the result against your project's rule.
How words are detected
Any character that is not a letter, digit or combining mark separates words, so spaces, _, -, . and / all work. Inside a token, a new word starts at a lowercase-to-uppercase change (fooBar), at the last capital of an acronym followed by a lowercase letter (XMLHttp to XML Http), and at a capital after a digit (v2Api). Apostrophes inside words are dropped (don't to dont). Scripts without case, such as Chinese or Japanese, never cause a split.