The styles
| Style | Example | Typical use |
|---|---|---|
| Sentence case | The quick brown fox | Normal text, headlines in many publications |
| lower case | the quick brown fox | Tags, emails, fixing accidental CAPS LOCK |
| UPPER CASE | THE QUICK BROWN FOX | Headings, labels, emphasis |
| Title Case | The Quick Brown Fox | Titles of books, articles and songs |
| camelCase | theQuickBrownFox | Variables in JavaScript, Java, Swift |
| PascalCase | TheQuickBrownFox | Classes and types, React components |
| snake_case | the_quick_brown_fox | Python, Ruby, database columns |
| kebab-case | the-quick-brown-fox | URLs, CSS classes, file names |
| CONSTANT_CASE | THE_QUICK_BROWN_FOX | Constants and environment variables |
How it works
Text styles keep your punctuation, spacing and line breaks. Sentence case lowercases everything and then capitalizes the first letter after each full stop, question mark, exclamation mark or line break, as well as the pronoun “I”. Proper nouns such as names and places cannot be detected, so check them after converting.
Programming styles first split the text into words, ignoring punctuation, and then join the words with the separator and capitalization of the chosen style. Converting between them works in any direction: user_first_name → userFirstName → UserFirstName → user-first-name.
Letters with accents and other alphabets (Greek, Cyrillic…) are converted with your browser’s language rules. The German ß becomes SS in upper case, as the spelling rules require.
Examples
- Headline: “a tale of two cities” → “A Tale of Two Cities”.
- Fixing CAPS LOCK: “HELLO THERE. HOW ARE YOU?” → “Hello there. How are you?”
- Code: “XMLHttpRequest” →
xml_http_request; “maxRetryCount” →MAX_RETRY_COUNT.