Text Case Converter

Convert text to UPPERCASE, lowercase, Title Case, camelCase, snake_case, kebab-case, and more. 10 case formats supported.

Convert to:
0 chars0 words0 lines
Converted text will appear here…

Naming conventions by language

ConventionExampleUsed in
camelCasegetUserByIdJavaScript/TypeScript variables & functions
PascalCaseUserProfileClasses, React components, TypeScript types
snake_caseuser_id, get_userPython, Ruby, PostgreSQL, Rust
kebab-caseuser-profile, my-componentURLs, CSS classes, HTML attributes, file names
CONSTANT_CASEMAX_RETRIES, API_KEYConstants in most languages
dot.caseuser.profile.idConfig keys, logging namespaces
UPPERCASEHTTP, SQLAcronyms, SQL keywords

Converting cases in code

// JavaScript — camelCase to snake_case
const toSnake = s => s.replace(/[A-Z]/g, c => '_' + c.toLowerCase());
toSnake("getUserById"); // → "get_user_by_id"

// snake_case to camelCase
const toCamel = s => s.replace(/_([a-z])/g, (_, c) => c.toUpperCase());
toCamel("get_user_by_id"); // → "getUserById"

// Python (built-in via re)
import re
def to_snake(s):
    return re.sub(r'([A-Z])', r'_\1', s).lower().lstrip('_')

// CSS: always use kebab-case
.user-profile { }       /* correct */
.userProfile  { }       /* avoid  */

Related Tools

Frequently Asked Questions

What case formats are supported?

UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, and dot.case — 10 formats total.

What is camelCase vs PascalCase?

camelCase starts with a lowercase letter (e.g., myVariableName). PascalCase starts with an uppercase letter (e.g., MyVariableName). Both are commonly used in programming.

When should I use snake_case vs kebab-case?

snake_case is common in Python, Ruby, and databases. kebab-case is common in URLs, CSS, and HTML attributes. Both separate words but with different characters.

Does this tool handle special characters?

Yes. The converter intelligently splits text on spaces, hyphens, underscores, and camelCase boundaries to convert between any format accurately.