Text Case Converter

Easily change text case to Upper, Lower, Title, or developer formats like camelCase.
100% Free β€” No registration required.

9+Case Formats
InstantConversion
0Signup 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

FormatExampleCommon Usage
camelCasemyVariableNameJavaScript variables, Java methods
PascalCaseMyClassNameClasses, React components, C# types
snake_casemy_variable_namePython, Ruby, database columns
kebab-casemy-css-classCSS classes, HTML attributes, URLs
CONSTANT_CASEMAX_VALUEConstants, environment variables
Title CaseMy Article TitleHeadlines, 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.

JavaScriptString methods + custom
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();
Pythonstr methods
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:])
CSStext-transform
/* 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;
}
PHPString functions
$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.

Related Tools