CalcMountain

Text Case Converter

Paste or type text and convert it between uppercase, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, and kebab-case. Useful for formatting headings, code variables, and more.

Text case conversion is one of the most common text manipulation tasks across writing, programming, and design. Different contexts demand different cases: UPPERCASE for emphasis and acronyms; lowercase for casual writing and email addresses; Title Case for headings and titles; Sentence case for body text and standard prose; programmer cases (camelCase, PascalCase, snake_case, kebab-case) for code variables, file names, URL slugs, and CSS class names. Manually retyping text in different cases is tedious and error-prone, especially for long passages.

Common conversion needs: pasting all-caps text from a PDF and needing it in title case for a heading; converting a heading to a URL-friendly kebab-case slug; switching variable naming convention when migrating code between languages (Python snake_case to JavaScript camelCase); fixing accidentally enabled caps lock; converting acronym-heavy text to readable case; formatting CSV data with consistent case for clean spreadsheets.

This calculator handles the most common case conversions: UPPER, lower, Title, Sentence, camelCase, PascalCase, snake_case, kebab-case, and CONSTANT_CASE. Use it for: writing and editing (changing headline case), web development (URL slug generation, variable naming), data cleaning (standardizing CSV/spreadsheet case), code refactoring (changing naming conventions), formatting academic citations (style guides require specific case rules), or any text manipulation requiring case transformation. Important context: Title Case rules vary by style guide. APA, MLA, Chicago, and AP styles all have slightly different rules about when to capitalize short words (articles, prepositions, conjunctions). This calculator uses general Title Case (capitalize most words); style-specific conversion may require additional manual adjustment.

Enter or paste your text

Results

UPPERCASE

lowercase

Title Case

Sentence case

All Conversions

Case StyleResult
UPPERCASE
lowercase
Title Case
Sentence case
camelCase
PascalCase
snake_case
kebab-case
Last updated:

Formula

Text case formats: UPPERCASE: every letter capital Example: "HELLO WORLD" lowercase: every letter small Example: "hello world" Title Case: first letter of every word capital Example: "Hello World" Variation: AP/Chicago style lowercases short articles ("the", "an", "of") Example: "The Quick Brown Fox Jumps Over the Lazy Dog" Sentence case: first letter of sentence capital Example: "Hello world. Goodbye world." Programmer cases: camelCase: lowercase first word, capitalize subsequent words, no spaces Used in: JavaScript, Java, Swift, Kotlin Example: "hello world" → "helloWorld" Example: "first name" → "firstName" PascalCase (UpperCamelCase): capitalize all words, no spaces Used in: C#, Pascal, class names in many languages Example: "hello world" → "HelloWorld" snake_case: lowercase, words separated by underscores Used in: Python, Ruby, database column names, SQL Example: "hello world" → "hello_world" Example: "First Name" → "first_name" UPPER_SNAKE_CASE (CONSTANT_CASE / SCREAMING_SNAKE_CASE): uppercase with underscores Used for: constants in many languages Example: "max value" → "MAX_VALUE" kebab-case: lowercase, words separated by hyphens Used in: URLs, CSS classes, HTML IDs, file names Example: "hello world" → "hello-world" Example: "User Profile" → "user-profile" dot.case: lowercase, words separated by dots Used in: domain names, file extensions, configuration keys Example: "hello world" → "hello.world" PATH/case: mixed separators for specific use cases Less common, but used in some configuration files Conversion logic: To camelCase: 1. Lowercase entire string 2. Split by spaces/separators 3. Keep first word lowercase 4. Capitalize first letter of subsequent words 5. Remove all spaces and separators To snake_case: 1. Lowercase entire string 2. Replace spaces with underscores 3. Handle compound words from PascalCase: insert underscore before each capital To kebab-case: 1. Lowercase entire string 2. Replace spaces with hyphens 3. Handle compound words from PascalCase: insert hyphen before each capital Title Case rules (style-dependent): APA Style (American Psychological Association): - Capitalize words of 4+ letters - Capitalize first/last words always - Lowercase shorter articles, prepositions, conjunctions - Example: "On the Effect of Sleep on Performance" MLA Style (Modern Language Association): - Similar to APA - Slight differences for hyphenated compounds Chicago Manual of Style: - Capitalize first/last word - Capitalize all major words (nouns, pronouns, verbs, adjectives, adverbs) - Lowercase articles (a, an, the), conjunctions (and, but, or), prepositions - Capitalize prepositions of 5+ letters in Chicago AP Style (Associated Press): - Capitalize words of 4+ letters - Used in journalism This calculator uses general Title Case (capitalize most words); for strict style guide compliance, manual review needed. Common conversion patterns: Heading to URL slug: "How to Calculate Mortgage Payments" → "how-to-calculate-mortgage-payments" (kebab-case) API endpoint to variable name: "/user/profile/photo" → "userProfilePhoto" (camelCase) Class name to file name: "UserProfileController.cs" → "user-profile-controller.cs" (kebab-case file) Database column to property: "user_first_name" → "userFirstName" (Java camelCase property) "user_first_name" → "UserFirstName" (C# PascalCase property) Special considerations: Acronyms in different cases: "URL parser" → camelCase: "urlParser" or "URLParser" (style debate) "HTML element" → "htmlElement" or "HtmlElement" Modern style guides increasingly prefer treating acronyms as words Initialisms vs. acronyms: Acronym: pronounced as word (NASA = "nasa") Initialism: spelled letter-by-letter (FBI = F.B.I.) May affect case treatment in formal writing Hyphenated words: "Wi-Fi" stays "Wi-Fi" in most cases (treated as compound) "self-driving" → Title Case: "Self-Driving" Unicode considerations: Non-Latin scripts (Chinese, Japanese, Korean) don't have case Letter case for Latin extended (accented characters) preserved during conversion Some characters have unique upper/lowercase pairs (German ß → SS in uppercase)

How to use this calculator

  1. Paste or type your text into the input area.
  2. Select desired output format (UPPERCASE, lowercase, Title Case, etc.).
  3. Review converted text.
  4. For URL slugs: use kebab-case (lowercase with hyphens).
  5. For code variables: use camelCase (JavaScript, Java) or snake_case (Python, Ruby) or PascalCase (C#, classes).
  6. For SEO-friendly URLs: use lowercase, hyphens, no special characters.
  7. For database columns: typically snake_case (PostgreSQL, MySQL convention).
  8. For headings/titles: use Title Case (general) or specific style guide rules (APA, MLA, Chicago).
  9. For body text: use Sentence case.
  10. For emphasis (sparingly): UPPERCASE.
  11. For email addresses: typically lowercase (case-insensitive but lowercase prevents typos).
  12. For acronym-heavy text: consider style guide preferences for treating acronyms (URL vs. Url vs. url in code).

Worked examples

Blog post URL generation

Blog title: "10 Tips for Better Sleep: How to Improve Your Sleep Quality Tonight" Conversion to URL slug (kebab-case): "10-tips-for-better-sleep-how-to-improve-your-sleep-quality-tonight" Length: 65 characters — long but acceptable. Optimization: many SEO experts recommend shorter URLs (under 75 chars). Consider: "10-tips-better-sleep-improve-quality" (39 chars) Cleaner. Keeps key terms. Removes filler words. For SEO best practices: - All lowercase - Hyphens between words (not underscores; hyphens better for SEO) - No special characters (& becomes "and" or removed) - Use main keywords - Keep concise but descriptive Final URL: yoursite.com/blog/10-tips-better-sleep-improve-quality

Code variable refactoring

Migrating Python code to JavaScript. Variable names need conversion. Python (snake_case): user_first_name = "John" total_order_amount = 99.99 is_premium_member = True database_connection_string = "postgres://..." Convert to JavaScript (camelCase): userFirstName = "John" totalOrderAmount = 99.99 isPremiumMember = true databaseConnectionString = "postgres://..." Bulk conversion of database column names to JavaScript properties: user_id → userId created_at → createdAt last_login_timestamp → lastLoginTimestamp email_verified_at → emailVerifiedAt ORM (Object-Relational Mapping) tools often handle this automatically, but manual code refactoring across languages requires bulk case conversion. This calculator handles the conversion logic; manual review needed for special cases (acronyms, abbreviations).

Document title casing

Original (all caps from PDF copy-paste): "ANNUAL REPORT 2024: FINANCIAL HIGHLIGHTS AND FUTURE OUTLOOK" Convert to Title Case: "Annual Report 2024: Financial Highlights And Future Outlook" Issues: "And" is capitalized but most style guides lowercase conjunctions. Manual adjustment for AP/Chicago style: "Annual Report 2024: Financial Highlights and Future Outlook" For sentence case (body): "Annual report 2024: financial highlights and future outlook" Different contexts use different cases: - Document title: Title Case - Heading 1: Title Case - Heading 2-6: Title Case or Sentence case depending on style - Body paragraphs: Sentence case - Captions: Sentence case - Buttons/UI elements: Title Case or UPPER (style-dependent) - File names: kebab-case or snake_case (depending on system) Consistency matters more than perfection. Pick a style and apply throughout.

When to use this calculator

Use this calculator for text formatting tasks across writing, programming, data cleaning, and design. Useful for: URL slug generation, code variable refactoring, document title casing, CSV/data standardization, social media post formatting, or any task requiring consistent case transformation.

Important text case considerations:

1. **Context determines case.** Headings → Title Case. Body text → Sentence case. URLs → kebab-case. Variables → context-dependent (camelCase, snake_case, or PascalCase).

2. **Style guides differ on details.** APA, MLA, Chicago, AP have different rules for which short words to capitalize in titles. This calculator uses general rules; verify against specific style guide.

3. **Programming convention varies by language.** Python: snake_case. JavaScript: camelCase. C#: PascalCase for classes, camelCase for variables. SQL: snake_case for columns.

4. **URL casing affects SEO.** Lowercase preferred. Hyphens (not underscores) for word separation. Keep concise.

5. **Acronym handling varies.** "URL" vs. "Url" vs. "url" in code styles. Modern preference: treat acronyms as words ("urlParser") rather than maintaining all caps ("URLParser").

6. **Title Case excludes some words.** Articles (a, an, the), conjunctions (and, but, or), short prepositions (in, on, at) typically lowercase except as first/last word.

7. **Sentence case for body text.** Standard prose uses sentence case (capital first letter of sentence only).

8. **Database conventions matter.** PostgreSQL/MySQL: snake_case columns. Mongo: camelCase. Match your database's convention.

9. **CSS classes use kebab-case.** ".user-profile" not ".userProfile". BEM methodology extends this with double-hyphens and double-underscores.

10. **HTML IDs use kebab-case typically.** Though camelCase works in modern HTML, kebab-case is convention.

11. **File names: depends on system.** Unix/Linux/Mac: kebab-case or snake_case common. Windows: less strict. Match team's convention.

12. **Consistency matters more than specific choice.** Within a project, codebase, or document: pick a convention and apply uniformly.

Common mistakes to avoid

  • Mixing case conventions in code. Pick one style per language and apply uniformly.
  • Using underscores in URLs instead of hyphens. Hyphens preferred for SEO.
  • Capitalizing every word in Title Case strictly. Style guides typically lowercase short articles/prepositions.
  • Forgetting to lowercase URL slugs. URLs should always be lowercase for consistency.
  • Manual case conversion for long text. Calculator faster and error-free.
  • Not adjusting for acronyms. URL parser → urlParser or URLParser — pick convention.

Frequently Asked Questions

Sources & further reading

SponsoredShop Top Deals on AmazonSupport CalcMountain — browse top-rated products at no extra cost to you.

Related Calculators