Text Case Converter
Easily change text case to Upper, Lower, Title, or developer formats like camelCase.
100% Free β No registration required.
Common Use Cases
Why developers and writers need case conversion
Variable Naming
Convert natural language to camelCase, snake_case, or PascalCase for code variables and functions.
URL Slugs
Create SEO-friendly URLs using kebab-case from titles and headings.
Headlines & Titles
Convert text to Title Case for professional headings and article titles.
Database Columns
Generate snake_case column names for SQL databases and API responses.
Naming Convention Reference
| Format | Example | Common Usage |
|---|---|---|
| camelCase | myVariableName | JavaScript variables, Java methods |
| PascalCase | MyClassName | Classes, React components, C# types |
| snake_case | my_variable_name | Python, Ruby, database columns |
| kebab-case | my-css-class | CSS classes, HTML attributes, URLs |
| CONSTANT_CASE | MAX_VALUE | Constants, environment variables |
| Title Case | My Article Title | Headlines, book titles, UI labels |
Available Formats
This tool supports conversions for both standard writing and programming variable naming conventions.
Standard Text
- lower case: all letters are lowercased.
- UPPER CASE: ALL LETTERS ARE CAPITALIZED.
- Title Case: The First Letter Of Every Word Is Capitalized.
- Sentence case: Only the first letter of the sentence is capitalized.
Developer Formats
- camelCase: javaScriptVariableStyle
- PascalCase: ReactComponentStyle
- snake_case: python_variable_style
- kebab-case: css-class-name-style
- CONSTANT_CASE: ENV_VARIABLE_STYLE
Text Case Conversion in Code
String manipulation is a core skill. Here is how to change text case in popular languages.
const text = "Hello World";
// Built-in
text.toLowerCase(); // "hello world"
text.toUpperCase(); // "HELLO WORLD"
// camelCase (custom)
const toCamel = str => str.toLowerCase()
.replace(/[^a-z0-9]+(.)/g, (_, c) => c.toUpperCase());
// snake_case (custom)
const toSnake = str => str
.replace(/([A-Z])/g, '_$1').toLowerCase();text = "hello world"
# Built-in methods
text.lower() # "hello world"
text.upper() # "HELLO WORLD"
text.title() # "Hello World"
text.capitalize() # "Hello world"
text.swapcase() # "HELLO WORLD"
# snake_case to camelCase
import re
def to_camel(s):
parts = s.split('_')
return parts[0] + ''.join(p.title() for p in parts[1:])/* Visual only - doesn't change HTML */
.lower { text-transform: lowercase; }
.upper { text-transform: uppercase; }
.title { text-transform: capitalize; }
/* Modern: balance text wrapping */
h1 {
text-wrap: balance;
text-transform: uppercase;
}$text = "Hello World";
strtolower($text); // "hello world"
strtoupper($text); // "HELLO WORLD"
ucwords($text); // "Hello World"
ucfirst($text); // "Hello world"
lcfirst($text); // "hello World"
// For UTF-8/multibyte strings
mb_strtolower($text, 'UTF-8');Frequently Asked Questions
What's the difference between camelCase and PascalCase?
camelCase starts with a lowercase letter (myVariable), while PascalCase starts with uppercase (MyClass). Use camelCase for variables/functions, PascalCase for classes and React components.
When should I use snake_case vs kebab-case?
snake_case is common in Python, Ruby, and databases. kebab-case is used for CSS classes, HTML attributes, and URL slugs since hyphens are valid in those contexts.
What is Title Case used for?
Title Case capitalizes the first letter of each word. It's used for headlines, article titles, book titles, and formal document headings. Some style guides exclude small words.
What is CONSTANT_CASE?
CONSTANT_CASE (SCREAMING_SNAKE_CASE) uses all uppercase with underscores. It's used for constants and environment variables: MAX_SIZE, API_KEY, DATABASE_URL.
Does CSS text-transform actually change the text?
No. CSS text-transform only changes how text is displayed visually. The underlying HTML/content remains unchanged. For actual text modification, use JavaScript or server-side code.
How do I handle unicode/special characters?
For non-ASCII characters (Γ©, Γ±, δΈζ), use locale-aware methods: JavaScript's toLocaleUpperCase(), Python's casefold(), or PHP's mb_strtolower() with UTF-8 encoding.