Case Converter

Transform text between UPPERCASE, lowercase, Title Case, Sentence case, and other formats.

Back to all tools on ToolForge

More in Text Tools



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

Edge Cases and Special Handling

How to Convert Text Case

  1. Enter text: Type or paste the text to convert.
  2. Select format: Click the button for your target case format.
  3. Review result: Converted text replaces the original instantly.
  4. Copy output: Use "Copy Result" or Ctrl/Cmd+C to copy.

Tips

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.