The nine styles
| Style | Example | Where it is used |
|---|---|---|
| UPPERCASE | QUICK BROWN FOX | Headings, warnings, acronyms |
| lowercase | quick brown fox | Email addresses, tags, normalising input |
| Title Case | Quick Brown Fox | Headlines, names, menu items |
| Sentence case | Quick brown fox | Body text, buttons and labels in most style guides |
| camelCase | quickBrownFox | Variables and functions in JavaScript, Java, Swift |
| PascalCase | QuickBrownFox | Classes, types, React components |
| snake_case | quick_brown_fox | Python, Ruby, database columns |
| kebab-case | quick-brown-fox | URLs, CSS classes, file names |
| CONSTANT_CASE | QUICK_BROWN_FOX | Constants, environment variables |
How words are found
For the five naming styles the text is first split into words. A new word starts at any space or punctuation mark, where a lowercase letter is followed by an uppercase one (userProfile → user, Profile), and where a run of capitals ends (imageURLPath → image, URL, Path). Each line is converted separately, so you can paste a list of names and convert them all.
Title case here capitalises every word. Style guides such as AP or Chicago keep short words like “of” and “the” in lowercase, which needs an editor's judgement.
Questions
Does it work with accented letters?
Yes. Conversion follows Unicode rules, so é becomes É and ß becomes SS.
What happens to digits?
Digits stay with the word they are attached to. version2Beta becomes version2, Beta.
Why did my acronym change?
camelCase and PascalCase lowercase everything after a word's first letter, so parseHTML becomes parseHtml. Most naming guides recommend that form.