Case Converter
Transform text between UPPERCASE, lowercase, Title Case, Sentence case, and other formats.
Back to all tools on ToolForge
About Case Converter
This tool performs text case transformations for writing, editing, and code formatting workflows. It handles standard case formats (UPPERCASE, lowercase, Title Case, Sentence case) plus programming conventions and special formats.
Text Case Format Reference
| Case Type | Example | Primary Use Case |
|---|---|---|
| UPPERCASE | HELLO WORLD | Acronyms, constants, emphasis, alarms |
| lowercase | hello world | Informal text, code, data normalization |
| Title Case | Hello World | Book titles, article headlines, names |
| Sentence case | Hello world | Body text, descriptions, captions |
| camelCase | helloWorld | JavaScript/TypeScript variables, JSON keys |
| PascalCase | HelloWorld | Class names, types, components |
| snake_case | hello_world | Python/Ruby variables, SQL columns |
| kebab-case | hello-world | URLs, CSS classes, HTML attributes |
| SCREAMING_SNAKE | HELLO_WORLD | Constants, environment variables |
Title Case Rules by Style Guide
Different style guides have varying Title Case rules:
| Style Guide | Capitalizes | Lowercases |
|---|---|---|
| APA (7th ed.) | Words 4+ letters, first/last words | Articles, conjunctions, prepositions <4 letters |
| MLA (9th ed.) | Major words, first/last words | Articles, prepositions, coordinating conjunctions |
| Chicago (17th ed.) | Major words, first/last words | Articles, coordinating conjunctions, prepositions |
| AP Stylebook | Principal words, first/last words | Articles, conjunctions <4 letters, prepositions <4 letters |
Case Conversion Algorithm
JavaScript Case Transformation Functions:
// UPPERCASE - simple toUpperCase()
function toUpperCase(text) {
return text.toUpperCase();
}
// lowercase - simple toLowerCase()
function toLowerCase(text) {
return text.toLowerCase();
}
// Title Case - capitalize major words
function toTitleCase(text) {
const minorWords = ['a', 'an', 'the', 'and', 'but', 'or', 'nor',
'for', 'so', 'yet', 'in', 'on', 'at', 'to',
'by', 'of', 'with', 'as'];
return text.toLowerCase().split(' ').map((word, i) => {
if (i === 0 || i === words.length - 1) {
return word.charAt(0).toUpperCase() + word.slice(1);
}
if (minorWords.includes(word)) return word;
return word.charAt(0).toUpperCase() + word.slice(1);
}).join(' ');
}
// Sentence case - capitalize first letter of sentences
function toSentenceCase(text) {
return text.toLowerCase().replace(/(^\s*\w|[\.\!\?]\s*\w)/g, c =>
c.toUpperCase()
);
}
Programming Language Naming Conventions
| Language | Variables | Functions | Classes | Constants |
|---|---|---|---|---|
| JavaScript | camelCase | camelCase | PascalCase | UPPER_CASE |
| TypeScript | camelCase | camelCase | PascalCase | UPPER_CASE |
| Python | snake_case | snake_case | PascalCase | UPPER_CASE |
| Java | camelCase | camelCase | PascalCase | UPPER_CASE |
| C# | camelCase | PascalCase | PascalCase | UPPER_CASE |
| Ruby | snake_case | snake_case | PascalCase | UPPER_CASE |
| Go | camelCase | camelCase | PascalCase | camelCase |
| Rust | snake_case | snake_case | PascalCase | UPPER_CASE |
| PHP | camelCase | camelCase | PascalCase | UPPER_CASE |
Case Conversion Examples
Input: "the quick brown fox jumps over the lazy dog" ───────────────────────────────────────────────────── UPPERCASE: THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG lowercase: the quick brown fox jumps over the lazy dog Title Case: The Quick Brown Fox Jumps Over the Lazy Dog Sentence case: The quick brown fox jumps over the lazy dog camelCase: theQuickBrownFoxJumpsOverTheLazyDog PascalCase: TheQuickBrownFoxJumpsOverTheLazyDog snake_case: the_quick_brown_fox_jumps_over_the_lazy_dog kebab-case: the-quick-brown-fox-jumps-over-the-lazy-dog SCREAMING: THE_QUICK_BROWN_FOX_JUMPS_OVER_THE_LAZY_DOG
Readability Research
- UPPERCASE readability: Studies show all-caps text is 13-20% slower to read due to lack of letter shape variation (word superiority effect)
- Sentence case optimal: Default case for body text—familiar pattern reduces cognitive load
- Title Case for short text: Effective for headings under 10 words; longer titles become harder to scan
- mixedCase recognition: camelCase and PascalCase improve identifier recognition in code vs underscore variants (Binkley et al., 2006)
Edge Cases and Special Handling
- Acronyms: "NASA" → lowercase "nasa" loses meaning; consider preserving known acronyms
- Proper nouns: "john smith" → Title Case "John Smith" requires name detection
- Hyphenated words: "state-of-the-art" → Title Case varies by style guide
- Unicode characters: Non-ASCII letters (é, ñ, ü) may not transform correctly in all environments
- Turkish I problem: Turkish has dotted İ and dotless ı—toUpperCase/toLowerCase behave differently
How to Convert Text Case
- Enter text: Type or paste the text to convert.
- Select format: Click the button for your target case format.
- Review result: Converted text replaces the original instantly.
- Copy output: Use "Copy Result" or Ctrl/Cmd+C to copy.
Tips
- Transformations apply to entire text area content
- Clear all text with Ctrl/Cmd+A then Delete
- Multi-line text and paragraphs are preserved
- Punctuation and special characters remain unchanged
- For code: use language-appropriate conventions from the table above
Frequently Asked Questions
- What are the standard text case formats?
- Standard case formats include: UPPERCASE (ALL CAPS), lowercase (all small), Title Case (Capitalize Major Words), Sentence case (First letter only), camelCase (firstLowerThenUpper), snake_case (under_scores), and kebab-case (dash-separated). Each serves specific purposes in writing and programming.
- What is Title Case and what are the rules?
- Title Case capitalizes major words while lowercasing minor words. Rules: capitalize first/last words, nouns, verbs, adjectives, adverbs, pronouns; lowercase articles (a, an, the), coordinating conjunctions (and, but, or), and prepositions (in, on, at, by) unless they're the first word. Style guides (APA, MLA, Chicago) have slight variations.
- What is the difference between camelCase and PascalCase?
- camelCase starts with lowercase (userName, calculateTotal), while PascalCase starts with uppercase (UserName, CalculateTotal). In programming: JavaScript/TypeScript use camelCase for variables/functions, PascalCase for classes/types; C# uses PascalCase for methods/properties; Java uses camelCase for methods/variables, PascalCase for classes.
- Why is snake_case used in Python?
- Python's PEP 8 style guide recommends snake_case for variables and functions because it's highly readable, especially with long names. Underscores act as word separators similar to spaces. Python also uses UPPERCASE_SNAKE for constants and PascalCase for class names.
- What is alternating case used for?
- Alternating case (aLtErNaTiNg CaSe) has no formal use—it's primarily internet slang used mockingly to indicate sarcasm or mock repetition. The pattern alternates lowercase/uppercase letters. Not used in professional writing or code due to poor readability.
- How does case sensitivity affect programming?
- Most programming languages (JavaScript, Python, Java, C#, etc.) are case-sensitive: userName and UserName are different identifiers. This allows distinct naming but requires consistency. SQL is case-insensitive for keywords but case-sensitive for string values. File systems vary: Windows/macOS are case-insensitive, Linux is case-sensitive.