Case Converter

Type TextSee 11 CasesCopy
11 Case TypesFreeNo SignupInstant Conversion
Samples:

Enter text above to see all 11 case conversions

When to Use Each Case

CaseUsed ForLanguages
camelCaseVariables, function namesJavaScript, Java, Swift, Kotlin
PascalCaseClasses, types, componentsAll languages (universal)
snake_caseVariables, functions, filesPython, Ruby, Rust, Elixir
kebab-caseURLs, CSS classes, CLI flagsHTML, CSS, shell scripts
CONSTANT_CASEConstants, env variablesAll languages (universal)
dot.caseConfig keys, Java packagesJava, Spring, properties files

Conventions by Language

LanguageVariableClassConst
JavaScript / TypeScriptcamelCasePascalCaseUPPER_SNAKE
Pythonsnake_casePascalCaseUPPER_SNAKE
GocamelCasePascalCasecamelCase
Rustsnake_casePascalCaseUPPER_SNAKE
CSS / HTMLkebab-casekebab-case--kebab-var

Click to Try

What is Case Conversion?

Case conversion is the process of changing the capitalization pattern of text according to specific formatting rules. While seemingly simple, it is a fundamental operation in software development, web design, content writing, and data management. Each programming language, platform, and context has its own conventions for text casing, and following the correct convention ensures code readability, maintainability, and consistency across an entire project.

This tool supports 11 popular case types, from basic ones like UPPERCASE and lowercase to programming-specific formats like camelCase, snake_case, and kebab-case. All conversions happen instantly in your browser with complete privacy and no data sent to any server.

Types of Text Cases Explained

Understanding each case type helps you choose the right convention for every context:

  • UPPERCASE: All characters capitalized. Used for emphasis in headings, acronyms (NASA, HTML), and constants in some languages. Note: using all caps in emails or messages can be perceived as shouting.
  • lowercase: All characters in lowercase. Common in URLs, email addresses, and usernames on most platforms.
  • Title Case: First letter of each word capitalized. Standard for article titles, book names, and document headings. Some style guides (APA, Chicago) have specific rules about which short words (prepositions, articles) remain lowercase.
  • Sentence case: Only the first letter of each sentence is capitalized. The most natural format for body text, product descriptions, and subtitles.
  • camelCase: First word lowercase, subsequent words start with uppercase, no separators. The standard convention for variables and functions in JavaScript, TypeScript, Java, and Swift. Examples: getUserProfile, isLoading, maxRetryCount.
  • PascalCase: Same as camelCase but the first word is also capitalized. Used for class names, interfaces, types, and React components in most languages. Examples: UserProfile, HttpClient, NavigationMenu.
  • snake_case: Words joined by underscores, all lowercase. The standard convention for Python, Ruby, Rust, and PostgreSQL database columns. Examples: user_profile, created_at, max_retry_count.
  • kebab-case: Words joined by hyphens, all lowercase. Used for URL slugs, CSS class names, HTML attributes, and file names in many projects. Examples: user-profile, nav-menu-item.
  • CONSTANT_CASE: snake_case in all uppercase. Used for constants and environment variables. Examples: MAX_RETRY_COUNT, API_BASE_URL, DATABASE_HOST.
  • dot.case: Words joined by periods. Common in Java configuration (properties files), Spring Boot settings, and package names. Examples: app.server.port, com.example.service.
  • path/case: Words joined by forward slashes. Used for file paths, namespaces, and routing. Example: user/profile/settings.

Naming Conventions by Language

Every major programming language has community-established naming conventions. Following these conventions makes your code consistent with the ecosystem and more readable for other developers:

  • JavaScript/TypeScript: Variables and functions use camelCase (fetchUserData), classes and components use PascalCase (UserService), constants use CONSTANT_CASE (MAX_TIMEOUT), files can use camelCase or kebab-case depending on the project.
  • Python: Variables and functions use snake_case (get_user_data), classes use PascalCase (UserService), constants use CONSTANT_CASE (MAX_TIMEOUT). PEP 8 is the authoritative style guide.
  • Go: Private variables and functions use camelCase (getUserData), exported (public) ones use PascalCase (GetUserData). Go uses capitalization to control visibility instead of public/private keywords.
  • Rust: Variables and functions use snake_case, types and traits use PascalCase, constants and statics use CONSTANT_CASE. The compiler issues warnings if you violate these conventions.
  • CSS: Class names and IDs use kebab-case (.nav-menu-item), CSS custom properties use kebab-case with -- prefix (--primary-color). BEM methodology extends this with block__element--modifier notation.

camelCase vs snake_case vs kebab-case

These three are the most widely used case formats in programming, and each has distinct strengths and trade-offs:

  • camelCase: Compact and quick to read, the default in the JavaScript/Java ecosystem. Drawback: word boundaries become hard to spot in very long identifiers, and abbreviations can cause ambiguity (is it XMLHTTPRequest or XmlHttpRequest?).
  • snake_case: Most readable due to clear underscores separating each word. Prevalent in Python, Ruby, and database column names. Drawback: longer than camelCase and requires typing the underscore character.
  • kebab-case: Most natural for URLs (SEO-friendly) and CSS. Cannot be used as a variable name in most programming languages because the hyphen is interpreted as a minus operator. Perfect for slugs, CSS classes, and command-line flags.

The golden rule: follow the convention of your language or framework. Never mix snake_case into a purely camelCase JavaScript project, and vice versa. Consistency matters far more than personal preference.

Best Practices for Naming

Beyond choosing the right case format, these practices make your variable, function, and file names clearer and more professional:

  • Describe purpose, not data type: Use userAge instead of intAge, isActive instead of boolFlag. Hungarian notation (data-type prefixes) is obsolete in most modern languages.
  • Start booleans with is/has/can/should: isLoggedIn, hasPermission, canEdit, shouldRefresh — makes reading code feel like reading natural English.
  • Start functions with a verb: getUser(), calculateTotal(), validateInput(), sendNotification(). Function names are actions, variable names are nouns.
  • Avoid ambiguous abbreviations: btn is widely accepted, but usr, mgr, impl can be confusing. When in doubt, spell it out.
  • Keep names concise but meaningful: Loop variables can be i, j, but variables with wide scope should be longer and self-explanatory. Rule of thumb: the wider the scope, the more descriptive the name should be.
  • Stay consistent across the project: Pick one convention and apply it everywhere. ESLint, Prettier, RuboCop, and other linters can automatically enforce naming conventions.

See related text tools: Slug Generator, Word Counter, Find and Replace, and JSON Formatter.

Frequently Asked Questions

You Might Also Like

Slug Generator — Create SEO-Friendly URL Slugs Instantly

Convert any title or text into clean, SEO-friendly URL slugs instantly. Supports Vietnamese, multilingual transliteration, bulk mode, and custom separators. Try it free now.

Find and Replace Text Online — Regex Search Replace Tool

Find and replace text online with regex support, case-sensitive matching, whole-word search, and highlighted matches. See match count and replace all or one at a time. Free browser-based tool for writers, developers, and data analysts.

Word Counter — Count Words Characters Sentences Paragraphs

Count words, characters (with and without spaces), sentences, paragraphs, reading time, speaking time, and top keywords in real time. Free word counter for writers, students, and SEO professionals.

Character Counter — Count Chars, Words, Bytes, Lines

Count characters (with and without spaces), words, UTF-8 bytes, and lines in real time. Check Twitter, SMS, meta description, and URL slug limits instantly. Free, no signup.

More Text Tools

Word Counter — Count Words Characters Sentences Paragraphs

Count words, characters (with and without spaces), sentences, paragraphs, reading time, speaking time, and top keywords in real time. Free word counter for writers, students, and SEO professionals.

Character Counter — Count Chars, Words, Bytes, Lines

Count characters (with and without spaces), words, UTF-8 bytes, and lines in real time. Check Twitter, SMS, meta description, and URL slug limits instantly. Free, no signup.

Slug Generator — Create SEO-Friendly URL Slugs Instantly

Convert any title or text into clean, SEO-friendly URL slugs instantly. Supports Vietnamese, multilingual transliteration, bulk mode, and custom separators. Try it free now.

Fancy Text Generator — Bold Italic Script Bubble Unicode Fonts for Social Media

Generate 20+ fancy Unicode text styles instantly: bold, italic, script, fraktur, bubble, small caps, and more. Copy and paste into Instagram, Twitter, Discord, and TikTok bios.

Lorem Ipsum Generator — Placeholder Text Maker

Generate Lorem Ipsum placeholder text by paragraphs, sentences, or words. Copy classic Latin filler text instantly for wireframes, mockups, and typography testing.

Text to Speech — Convert Text to Voice Online Free

Convert text to natural speech in your browser with 100+ voices, adjustable speed, pitch, and volume. Free TTS tool using Web Speech API — no signup, fully private.

Find and Replace Text Online — Regex Search Replace Tool

Find and replace text online with regex support, case-sensitive matching, whole-word search, and highlighted matches. See match count and replace all or one at a time. Free browser-based tool for writers, developers, and data analysts.

Remove Duplicate Lines — Deduplicate Text Online Free

Remove duplicate lines from any text instantly. Case-sensitive or case-insensitive matching, trim whitespace, sort output, keep first or last occurrence. Before/after comparison with stats. Free, browser-based, no signup.

About Text Tools

Text tools handle the daily grind of working with strings, paragraphs, and documents: counting words, reversing characters, transforming case, generating slugs, splitting long text, previewing Markdown. These replace separate desktop apps and complex CLI commands with a single URL you can bookmark and use without setup.

Why it matters

Writers, editors, and content teams work with text constraints everywhere — Twitter's 280-char limit, LinkedIn's 1,300-char optimal post, academic abstracts of 250 words, SEO meta descriptions capped at 155. A word counter that shows characters (with and without spaces), words, sentences, paragraphs, and reading time lets you hit platform specs without switching between tools.

Privacy and safety

Text tools process input entirely in your browser. Your blog draft, legal contract, or confidential email never leaves your device. Even the word counter doesn't transmit your text — it runs a simple counting function locally, which is actually all that's needed. If a text tool claims to 'process' your text on their server, the scope for data leakage is enormous and almost never justified.

Best practices

  • For SEO titles, aim for 50-60 characters including spaces (Google truncates longer titles)
  • Meta descriptions work best at 150-155 characters — Google has been showing ~160 on desktop, ~120 on mobile
  • When generating slugs, keep them short (3-5 words), all lowercase, hyphens-not-underscores, avoid stop words
  • Markdown preview is useful BEFORE publishing to verify headings, links, and lists render correctly on the target platform