Why text case matters
Text case is more than cosmetic. In programming, userName, user_name, UserName, and USER_NAME are all different identifiers that carry conventions about what they represent. In writing, sentence case and title case follow editorial rules that affect professionalism and readability.
Getting case wrong creates inconsistency, bugs (case-sensitive comparisons), and a poor impression. Getting it right is effortless with the right tool.
UPPERCASE
Every character is converted to its uppercase form. Digits and symbols are unchanged.
input: the quick brown fox
output: THE QUICK BROWN FOX
When to use it: Abbreviations (HTML, API, SQL), constants in code (MAX_RETRIES, API_KEY), emphasis in headings, legal document sections.
Caution: Extended blocks of uppercase text are significantly harder to read than mixed case. Use sparingly for emphasis.
lowercase
Every character is converted to its lowercase form.
input: The Quick Brown Fox
output: the quick brown fox
When to use it: Email addresses and usernames (convention), URL slugs (by some style guides), casual text processing where case distinction is unwanted.
Title Case
The first letter of each significant word is capitalised. Small function words — articles (a, an, the), short prepositions (in, on, at, for, to), and conjunctions (and, but, or) — are typically left lowercase unless they are the first or last word.
input: the quick brown fox jumps over the lazy dog
output: The Quick Brown Fox Jumps over the Lazy Dog
Title case rules vary slightly between style guides (APA, Chicago, MLA, AP). Most case converters use a simplified heuristic — for critical editorial work, review the output against your style guide.
When to use it: Article and blog post titles, headings in documents, book titles, video titles.
Sentence case
Only the first letter of the sentence is capitalised, plus any proper nouns.
input: the quick brown fox
output: The quick brown fox
When to use it: Most body copy, email subject lines, UI button labels and menu items (preferred in modern product design), social media captions.
Sentence case tends to feel more conversational and is increasingly preferred over title case for UI copy.
camelCase
Words are joined without spaces. The first word is all lowercase; each subsequent word starts with an uppercase letter.
input: user profile settings
output: userProfileSettings
When to use it: Variable and function names in JavaScript, Java, C#, and many other languages. Object property names in JSON.
const firstName = "Alice";
function getUserProfile() { /* ... */ }
PascalCase
Like camelCase, but the first word also starts with an uppercase letter. Also called UpperCamelCase.
input: user profile settings
output: UserProfileSettings
When to use it: Class and component names in most object-oriented languages, React component names, TypeScript interfaces and types.
class UserProfileSettings { /* ... */ }
function UserCard({ name }: Props) { /* ... */ }
type HttpResponse = { /* ... */ };
snake_case
Words are joined with underscores. All characters are lowercase.
input: user profile settings
output: user_profile_settings
When to use it: Variable and function names in Python, Ruby, Rust, and database column names. Configuration keys in many formats.
def get_user_profile():
user_profile_settings = {}
SCREAMING_SNAKE_CASE (all uppercase with underscores) is used for constants in many languages:
MAX_RETRY_COUNT = 3
API_BASE_URL = "https://api.example.com"
kebab-case
Words are joined with hyphens. All characters are lowercase. Also called dash-case or hyphen-case.
input: user profile settings
output: user-profile-settings
When to use it: URL slugs, CSS class names, HTML attributes (data-user-id), file names in web projects, CLI flags (--output-format).
.user-profile-card { /* ... */ }
<div class="user-profile-settings" data-user-id="1042"></div>
Choosing the right case
| Context | Convention |
|---|---|
| JavaScript variables and functions | camelCase |
| JavaScript classes and React components | PascalCase |
| CSS classes | kebab-case |
| Python variables and functions | snake_case |
| Python/JS constants | SCREAMING_SNAKE_CASE |
| Database columns | snake_case (common) |
| URL slugs | kebab-case |
| Article titles | Title Case or Sentence case |
| UI labels and buttons | Sentence case |
Use the Case Converter to instantly transform any text into the format you need — paste, click, and copy.