What each case does
Prose cases keep your spacing and punctuation. Code cases first split the text into words, then join them with a naming convention.
| Case | Result |
|---|---|
| UPPERCASE | THE QUICK BROWN FOX |
| Title Case | The Quick Brown Fox |
| Sentence case | The quick brown fox |
| camelCase | theQuickBrownFox |
| PascalCase | TheQuickBrownFox |
| snake_case | the_quick_brown_fox |
| kebab-case | the-quick-brown-fox |
| CONSTANT_CASE | THE_QUICK_BROWN_FOX |
How words are found for code cases
Words are split at spaces and punctuation, at lower-to-upper case changes, and between letters and digits. An acronym stays together until the next capitalized word, so "XMLHttpRequest id" becomes XML · Http · Request · id, giving xml_http_request_id in snake_case and xmlHttpRequestId in camelCase. Apostrophes are removed first, so "don't" becomes dont.
Letters in any script are recognized, including accented Latin, Greek and Cyrillic.
Limits
Title Case capitalizes every word. Editorial styles such as AP and Chicago lowercase short words like a, of and the, so adjust those by hand for headlines. Sentence case lowercases everything except the first letter of each sentence, which also lowercases names and acronyms.