Text Case Converter Guide: camelCase, snake_case, Title Case & More
Naming things is hard. Using the wrong case convention in your codebase, URLs, or content causes inconsistencies that accumulate into technical debt. This guide covers every major case style and when to use each one.
Reserved ad container for responsive Google AdSense display units
Why Case Conventions Matter
Case conventions—the systematic rules for capitalizing and separating words—are foundational to readable code, consistent naming, and professional writing. In programming, violating your project's case convention creates cognitive friction for every developer who reads the code after you. In URLs, the wrong case can break links and hurt SEO. In writing, inconsistent heading capitalization makes a document look unpolished.
Modern codebases enforce case conventions through linters (ESLint, Pylint, golangci-lint), formatter rules, and code review standards. Understanding each style makes you faster in any language or context.
The Major Case Styles Explained
camelCase
Each word after the first begins with a capital letter. No separators between words.
myVariableName
getUserProfile
calculateMortgagePayment
Used for: Variable and function names in JavaScript, Java, Swift, Kotlin, C#, TypeScript. Also the conventional style for JSON property names.
PascalCase (UpperCamelCase)
Like camelCase, but the first word also starts with a capital letter.
MyClassName
UserProfileComponent
MortgageCalculator
Used for: Class names, interface names, and type names in virtually all object-oriented languages. React component names must be PascalCase (lowercase components are treated as HTML elements).
snake_case
All lowercase, words separated by underscores.
my_variable_name
get_user_profile
calculate_mortgage_payment
Used for: Variable and function names in Python, Ruby, Rust, and most database column names. Also common for file names in Python projects (user_service.py).
SCREAMING_SNAKE_CASE (UPPER_SNAKE_CASE)
All uppercase, words separated by underscores.
MAX_RETRY_COUNT
API_BASE_URL
DEFAULT_TIMEOUT_MS
Used for: Constants and environment variable names in virtually every language. If you see SCREAMING_SNAKE_CASE in code, it signals "this value doesn't change at runtime."
kebab-case (hyphen-case)
All lowercase, words separated by hyphens.
my-variable-name
user-profile-component
mortgage-calculator
Used for: URL slugs (/blog/case-converter-guide), HTML/CSS class names, HTML attribute values (data-user-id), NPM package names, file names in Next.js and most frontend projects.
Title Case
The first letter of each major word is capitalized. Articles (a, an, the), coordinating conjunctions (and, but, or), and short prepositions (in, on, at) are typically lowercase unless they're the first or last word.
The Complete Guide to Regex Testing
How to Calculate Mortgage Payments
JSON Formatter and Validator for Developers
Used for: Book titles, blog post titles, article headings, product names, page <title> tags. Different style guides (AP, Chicago, APA, MLA) have slightly different rules for which words are capitalized.
Sentence case
Only the first word and proper nouns are capitalized.
The complete guide to regex testing
How to calculate mortgage payments
JSON formatter and validator for developers
Used for: Body text, UI button labels (Google Material Design recommends sentence case for buttons), email subjects in conversational contexts, and increasingly in modern UI copy for a less formal feel.
UPPERCASE and lowercase
All characters uppercase or all lowercase.
UPPERCASE — acronyms (HTML, CSS, JSON), keyboard shortcuts (CTRL+C)
lowercase — email addresses, usernames, domain names
Case in URLs: Why It Matters for SEO
URLs are case-sensitive on most web servers (Linux-based). /Blog/post-title and /blog/post-title are treated as different URLs, which can cause duplicate content issues and diluted PageRank. Best practices:
- Always use lowercase kebab-case for URL paths
- Configure your server or framework to redirect uppercase URLs to lowercase equivalents (Next.js handles this with
trailingSlashand middleware) - Use hyphens, not underscores, in URLs—Google treats hyphens as word separators but underscores as connectors (
word-counteris two words;word_counteris one "word" to Google's crawler)
Enforcing Case Conventions in Projects
Rather than relying on memory or code review, automate it:
- JavaScript/TypeScript: ESLint rules like
camelcase,@typescript-eslint/naming-convention - Python: Pylint/Flake8 enforce snake_case by default with PEP 8
- CSS: Stylelint with class-naming-pattern rules
- Files: Tools like
ls-lintenforce file naming conventions across a repository
Convert text between any case style instantly. Try ZapyNext's free Text Case Converter—paste any text and convert to camelCase, PascalCase, snake_case, kebab-case, UPPER_CASE, Title Case, sentence case, and more in one click. No sign-up needed.
Reserved ad container for responsive Google AdSense display units