Text case and code naming
Retyping text to fix its capitalization is slow and easy to get wrong. Maybe Caps Lock was on, a heading needs title case, or a list of field names has to become variable names in a different style. Paste the text above and every format is shown at once. Each line is converted separately, so you can paste a whole list of names.
Writing styles
- UPPERCASE turns every letter into a capital. Used for short labels, acronyms and emphasis.
- lowercase removes all capitals. Use it for tags or fields that accept lowercase. URL paths and some identifiers are case-sensitive, so check before converting them.
- Title Case capitalizes the main words of a headline. Short articles, conjunctions and prepositions such as "a", "and", "of" and "the" stay lowercase unless they are the first or last word. Style guides disagree on the details (AP, Chicago and APA treat longer prepositions differently), so check your house style for edge cases.
- Sentence case capitalizes only the first word of each sentence and the word "I". Use it when your style guide calls for sentence case.
- aLtErNaTiNg cAsE switches between lower and upper case on every letter. It has no practical use beyond jokes and memes.
Title Case and Sentence case try to keep acronyms such as NASA or HTML intact: a word in capitals is left alone when the text around it is in lowercase. Several capitalized words in a row, or text that is entirely in capitals, usually means Caps Lock was on, so those words are converted.
Programming naming conventions
Code identifiers cannot contain spaces, so programmers join words in different ways. The converter splits the input on spaces, punctuation and existing capital letters, so userID, user_id and User Id are all understood as the same two words.
| Style | Example | Common uses |
|---|---|---|
| camelCase | firstName | Variables and functions in JavaScript, Java and Swift |
| PascalCase | FirstName | Classes, types and React components; C# methods |
| snake_case | first_name | Python and Ruby variables, database columns |
| kebab-case | first-name | URLs, CSS classes, file names, command-line flags |
| CONSTANT_CASE | FIRST_NAME | Constants and environment variables |
Apostrophes are dropped when building identifiers, so "don't stop" becomes dontStop rather than donTStop.