How to use the Text Case Converter
Case conventions vary by context — JavaScript uses camelCase, CSS uses kebab-case, environment variables use UPPER_SNAKE_CASE, URL slugs use lower-kebab-case. The converter handles every direction.
Paste the source text
Any string in any case. The converter detects the input format automatically.
Pick the target case
camelCase, PascalCase, kebab-case, snake_case, SCREAMING_SNAKE_CASE, Title Case, UPPER CASE, lower case, Sentence case.
Copy the result
Paste into your code, URL slug, environment file, or wherever the convention requires that case.
Why case conventions matter
Programming languages, CSS, URLs, and environment variables each have established case conventions. Mixing them creates bugs (case-sensitive systems treat UserName and username as different) and signals carelessness.
Where each case is used
- camelCase — JavaScript variables, object properties, JSON keys. userName, isActive.
- PascalCase — class names, React components, type definitions. UserProfile, Button.
- kebab-case — URL slugs, CSS classes, CLI flags. user-profile, --dry-run.
- snake_case — Python variables, Ruby variables, SQL column names. user_name, created_at.
- SCREAMING_SNAKE_CASE — environment variables, constants. DATABASE_URL, MAX_RETRIES.
- Title Case — headings, titles, proper nouns. The Quick Brown Fox.
Common case-mixing bugs
- Filesystem case sensitivity —
UserController.jsandusercontroller.jstreated as different on Linux, same on macOS. - JSON key mismatches — frontend sends
userName, backend expectsuser_name. - CSS class typos —
.userProfilestyled but HTML usesclass="user-profile". - Env var case —
process.env.DATABASE_URLvsprocess.env.database_url.
Frequently asked questions
What case should I use for URL slugs?
lower-kebab-case (e.g., my-blog-post). All lowercase, words separated by hyphens. Hyphens are read as word separators by Google; underscores join words. Capital letters in URLs cause case-sensitivity bugs on Linux servers.
What's the difference between camelCase and PascalCase?
Both run words together with capitalization. camelCase starts lowercase (userName); PascalCase starts uppercase (UserName). camelCase is for variables and properties; PascalCase is for classes, types, and components.
Why do environment variables use SCREAMING_SNAKE_CASE?
Convention dating back to Unix. Uppercase distinguishes env vars from regular shell variables and from program code. Underscores separate words because shells treat hyphens as operators. DATABASE_URL not database-url or databaseUrl.
Should JSON keys be camelCase or snake_case?
Depends on the language conventions of the producer/consumer. JavaScript-heavy stacks lean camelCase. Python-heavy stacks lean snake_case. Ruby/Rails APIs traditionally use snake_case. Most APIs adopt one and document it consistently — switching mid-API creates bugs.
Is Title Case different from sentence case?
Yes. Title Case capitalizes most words ("The Quick Brown Fox"); sentence case capitalizes only the first word and proper nouns ("The quick brown fox"). News headlines tend toward Title Case; modern web typography increasingly prefers sentence case for cleaner aesthetics.