Text & Writing
Free Case Converter Online
Convert text between uppercase, lowercase, camelCase, snake_case, kebab-case and more.
What is a case converter?
A case converter transforms text between different capitalization formats instantly. It handles everything from simple uppercase/lowercase conversion to developer-specific naming conventions like camelCase, snake_case, and kebab-case — in one click, with no manual editing.
Developers use case converters to reformat variable names when switching languages, normalize database column names, or convert copy from content teams into code-safe identifiers. Writers use them to fix accidental caps lock, apply consistent headline capitalization, and prepare text for different publishing platforms.
How to use the case converter
- 1Type or paste your text
Enter any text in the left input field. The converter handles multi-line input, mixed cases, and text with numbers or symbols.
- 2Select a conversion format
Click any format button — Text group (Sentence, lower, UPPER, Title, Capitalized), Code group (camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE), or Fun group (aLtErNaTiNg, iNVERSE).
- 3View the result
The converted text appears instantly in the right panel. Code formats (camelCase, snake_case, etc.) use a monospace font for better readability.
- 4Copy the output
Click Copy to grab the converted text. Switch between formats without re-entering your text.
Naming convention guide for developers
Different programming languages and contexts have established naming conventions. Following them makes code more readable and consistent with the ecosystem:
| Format | Example | Use case |
|---|---|---|
camelCase | getUserData | JavaScript, TypeScript, Java, Swift — variables & functions |
PascalCase | UserDataService | React components, class names, TypeScript types & interfaces |
snake_case | get_user_data | Python (PEP 8), Ruby, SQL column names |
kebab-case | get-user-data | URLs, CSS class names, HTML attributes, file names |
CONSTANT_CASE | MAX_RETRY_COUNT | Constants and environment variables in most languages |
Title Case | Get User Data | Article headlines, UI headings, email subjects |
Sentence case | Get user data | Body text, UI labels, most modern web interfaces |
Real-world case conversion scenarios
These are the most common situations where you need a case converter — each requires a specific transformation:
user_first_name (snake_case)→userFirstName (camelCase)REST APIs and databases commonly use snake_case. JavaScript code should use camelCase per language convention.
First Name (Title Case)→first_name (snake_case)SQL column names use snake_case. Converting UI copy to database identifiers is a daily task for backend developers.
user-profile-card (kebab-case)→UserProfileCard (PascalCase)React component names must be PascalCase to distinguish them from HTML elements. File names often use kebab-case.
primaryButtonHover (camelCase)→primary-button-hover (kebab-case)CSS class names use kebab-case. Design tokens in JavaScript use camelCase. You convert when bridging the two.
database_host (snake_case)→DATABASE_HOST (CONSTANT_CASE)Environment variables and constants use UPPER_SNAKE_CASE across virtually all languages and platforms.
how to build a rest api→How to Build a REST API (Title Case)Title case for article headlines is standard in English publishing. The converter handles common style rules automatically.
Title case rules — which words to capitalize
Title case is more complex than simply capitalizing every word. Different style guides disagree on edge cases, but the most widely followed rules (AP Style, Chicago Manual) agree on the basics:
- The first and last word
- Nouns, verbs, adjectives, adverbs
- Pronouns (I, He, She, They)
- Subordinating conjunctions (Because, Although)
- Articles: a, an, the
- Short prepositions: in, on, at, to, by
- Coordinating conjunctions: and, but, or, nor
- The "to" in infinitives
Naming conventions across popular tech stacks
Each ecosystem has community-wide conventions baked into linters, code review expectations, and standard library design. Following them makes your code feel native to the stack and avoids friction during code review:
| Tech stack | Variables / Functions | Classes / Types | Constants | Files |
|---|---|---|---|---|
| JavaScript / TypeScript | camelCase | PascalCase | UPPER_SNAKE_CASE | kebab-case |
| React components | camelCase | PascalCase | UPPER_SNAKE_CASE | PascalCase.tsx |
| Python (PEP 8) | snake_case | PascalCase | UPPER_SNAKE_CASE | snake_case.py |
| Go | camelCase | PascalCase (exported) | camelCase or UPPER | snake_case.go |
| Rust | snake_case | PascalCase | UPPER_SNAKE_CASE | snake_case.rs |
| Java / Kotlin | camelCase | PascalCase | UPPER_SNAKE_CASE | PascalCase.java |
| C# (.NET) | camelCase (local), PascalCase (members) | PascalCase | PascalCase | PascalCase.cs |
| Ruby on Rails | snake_case | PascalCase | UPPER_SNAKE_CASE | snake_case.rb |
| CSS / SCSS classes | kebab-case | — | — | kebab-case.css |
| SQL (PostgreSQL) | snake_case | — | UPPER_SNAKE_CASE | snake_case.sql |
Automating case transformations in your codebase
Manual case conversion does not scale. When you are building APIs, transforming database schemas to JavaScript objects, or processing user-generated content, you need programmatic solutions. Here are the standard approaches:
API response normalization is one of the most common use cases. REST APIs from different backends use different conventions — a Python/Django API returns snake_case keys, a Java API returns camelCase or PascalCase, and some legacy APIs return UPPER_CASE. Libraries like camelcase-keys (npm) automatically convert all keys in a JSON response to camelCase, preventing inconsistent property names in your frontend codebase.
Linters enforce naming conventions automatically during development. ESLint's camelcase and @typescript-eslint/naming-convention rules report violations in your IDE as you type. Python's Flake8 and Pylint enforce PEP 8 naming. Setting these up once ensures all team members follow the same conventions without code review comments about naming.
Database-to-code mapping is another friction point. SQL tables and columns use snake_case by convention, but JavaScript objects typically use camelCase. ORMs like Prisma handle this automatically (a column created_at becomes createdAt in the Prisma client). If you write raw SQL, consider a lightweight mapping utility to keep both layers idiomatic.
File rename migrations occasionally require batch case conversion. Renaming a directory of React components from kebab-case to PascalCase, or standardizing a Python package's module files to snake_case, can be done with a shell script using rename (Linux/macOS) or the rename-cli npm package. Always run these with a dry-run flag first and update your import statements with a global find-and-replace afterward.
Choosing the right case for different contexts
The correct case convention is not just a style preference — it communicates intent and context to anyone reading your code. Using the wrong case creates cognitive friction and can even introduce bugs (for example, CSS class names with uppercase letters will not match, and Linux file paths are case-sensitive while Windows ones are not).
For UI copy (buttons, labels, navigation): Use sentence case as the default. Modern UI guidelines from Apple (Human Interface Guidelines), Google (Material Design), and Microsoft (Fluent Design) all recommend sentence case for labels and buttons because it reads more naturally and feels less formal. Reserve Title Case for page headings and dialog titles that function like document titles.
For API design: Choose one convention and apply it consistently across all endpoints. The most common REST API convention is camelCase for JSON property names (matching JavaScript object conventions) and kebab-case for URL path segments (/user-profiles not /userProfiles). GraphQL schemas use camelCase for field names and PascalCase for type names.
For file and folder naming: kebab-case is the safest choice for web projects because it is URL-safe, works consistently across Linux, macOS, and Windows, and avoids case collision issues when files are moved between operating systems. Component files in React projects are a common exception — PascalCase.tsx matches the component name and makes imports readable.
FAQ
Common questions
What is the difference between Title Case and Capitalized Words?
Title Case follows style guides — small words like "a", "the", "and", "in" stay lowercase unless they're the first word. Capitalized Words simply uppercases the first letter of every word, no exceptions.
What is camelCase used for?
camelCase is the standard naming convention in JavaScript, TypeScript, Java, and Swift for variables and functions. The first word is lowercase, every subsequent word starts with uppercase — e.g. "getUserData".
When should I use snake_case vs kebab-case?
snake_case is preferred in Python, Ruby, and database column names. kebab-case is standard for URLs, CSS class names, HTML attributes, and file names. Both are common in APIs.
What is CONSTANT_CASE?
CONSTANT_CASE (also called SCREAMING_SNAKE_CASE) is used for constants and environment variables in most languages — e.g. MAX_RETRY_COUNT or DATABASE_URL.
Does this tool work with multi-line text?
Yes. All conversions handle multi-line input correctly. Each line is converted independently for Sentence case and Capitalized modes.
What is PascalCase and where is it used?
PascalCase capitalizes the first letter of every word with no separators: UserProfile, InvoiceService, HttpRequest. It is the standard for class names and constructor functions in almost every language (JavaScript, TypeScript, Python, Java, C#, Go). In React, every component must be PascalCase — lowercase names are interpreted as HTML elements.
How does the converter handle numbers and special characters?
Numbers are preserved in place. Special characters like @, #, and ! are stripped when converting to code-style formats (camelCase, snake_case, kebab-case) since they are not valid in identifiers. For prose formats (Title Case, Sentence case), punctuation is preserved. Accented characters (é, ñ, ü) are kept as-is in all formats.
What is dot.case and when is it used?
dot.case joins words with a period: user.profile.name. It is rarely used for programming identifiers, but appears in configuration keys (Spring Boot properties files), JavaScript object path strings, and some logging frameworks. It is also the format for domain names and package namespaces like com.example.app.
More in Text & Writing