Case Converter: Transform Text Between camelCase, snake_case & More
Different programming languages and contexts have different naming conventions. JavaScript uses camelCase, Python prefers snake_case, CSS uses kebab-case, and environment variables use CONSTANT_CASE. Manually converting between these formats is tedious and error-prone.
Case Formats Explained
camelCase
First word lowercase, subsequent words capitalized, no separators.
hello world → helloWorld
user first name → userFirstName
Used in: JavaScript variables, Java methods, JSON keys, React props.
PascalCase
Every word capitalized, no separators. Also called “UpperCamelCase.”
hello world → HelloWorld
user first name → UserFirstName
Used in: JavaScript classes, React components, C# classes, TypeScript interfaces.
snake_case
All lowercase with underscores between words.
hello world → hello_world
user first name → user_first_name
Used in: Python variables, Ruby methods, PostgreSQL columns, Rust variables.
kebab-case
All lowercase with hyphens between words.
hello world → hello-world
user first name → user-first-name
Used in: CSS classes, HTML attributes, URL slugs, npm package names, Lisp.
CONSTANT_CASE
All uppercase with underscores. Also called “SCREAMING_SNAKE_CASE.”
hello world → HELLO_WORLD
max retry count → MAX_RETRY_COUNT
Used in: Constants in most languages, environment variables, C preprocessor macros.
dot.case
All lowercase with dots between words.
hello world → hello.world
app config path → app.config.path
Used in: Java package names, property file keys, Spring Boot configuration.
Title Case
First letter of each word capitalized.
hello world → Hello World
the quick brown fox → The Quick Brown Fox
Used in: Headings, titles, proper nouns.
Sentence case
Only the first letter of the first word capitalized.
hello world → Hello world
THE QUICK BROWN FOX → The quick brown fox
Used in: Body text, descriptions, UI labels.
How to Use Our Case Converter
- Type or paste text in the input area
- Click the case format you want
- View the converted result instantly
- Copy with one click
The converter intelligently splits your input into words regardless of the original format — it handles spaces, underscores, hyphens, camelCase boundaries, and mixed formats.
When to Use Each Format
| Context | Convention | Example |
|---|---|---|
| JavaScript/TypeScript variables | camelCase | userName |
| React components | PascalCase | UserProfile |
| Python/Ruby variables | snake_case | user_name |
| CSS classes | kebab-case | user-profile |
| Constants | CONSTANT_CASE | MAX_RETRIES |
| URLs/slugs | kebab-case | /user-profile |
| Database columns | snake_case | first_name |
| Environment variables | CONSTANT_CASE | DATABASE_URL |
Frequently Asked Questions
Can I convert from one programming case to another? Yes. The converter detects camelCase and PascalCase boundaries (where lowercase meets uppercase) and splits them into words before converting to the target format.
What about acronyms?
Acronyms like “API” or “URL” are treated as single words. Converting “apiURL” to snake_case produces “api_u_r_l.” For best results with acronyms, use spaces in your input: “api URL” → api_url.
Try our free Case Converter to transform text between any case format instantly.
Try Ghost Image Hub
The Chrome extension that makes managing your Ghost blog images a breeze.
Learn More