Case Converter
About the Case Converter
This case converter rewrites any text or identifier in ten formats at once: camelCase, PascalCase, snake_case, CONSTANT_CASE, kebab-case, dot.case, UPPER CASE, lower case, Title Case and Sentence case. Paste a variable name or a sentence and copy the version your code style or CMS needs.
Naming conventions explained
camelCase starts lowercase and capitalizes each following word. It is the default for variables and functions in JavaScript, TypeScript and Java.
PascalCase capitalizes every word, including the first. Use it for classes, React components, C# methods and TypeScript types.
snake_case joins lowercase words with underscores and is the norm in Python, Ruby and SQL column names. Its uppercase form, CONSTANT_CASE, is used for constants and environment variables such as DATABASE_URL.
kebab-case uses hyphens and suits URL slugs, CSS class names, HTML attributes and npm package names. dot.case shows up in config keys and i18n message IDs like app.title.main.
How words are detected
The converter splits input on spaces, underscores, hyphens and punctuation, and also at lowercase-to-uppercase boundaries. Runs of capitals are treated as acronyms, so XMLHttpRequest becomes xml_http_request and getUserID becomes get_user_id.
Numbers become their own word: version2Beta converts to version_2_beta in snake_case. Letters outside A-Z are kept, so café au lait turns into caféAuLait rather than losing the accent.
Title Case vs Sentence case
Title Case here capitalizes the first letter of every word, giving The Lord Of The Rings. It does not apply AP or Chicago style rules that keep short words like "of" and "the" lowercase, so adjust those by hand for published headlines.
Sentence case lowercases everything, then capitalizes the first letter of the text and of each new sentence after ., !, ? or a line break. Proper nouns and acronyms are lowercased too, so check names like "iPhone" or "NASA" afterward.
How to Use the Case Converter
- Type or paste your text or identifier into the Source String box.
- All ten conversions appear below as soon as there is input; there is no convert button.
- Find the format you need. Each card names the case and a typical use, such as "JS Variables" or "URLs/CSS".
- Click the copy icon on that card to put the result on your clipboard.
- Press Clear to empty the input and start over.
Frequently Asked Questions
- What is the difference between camelCase and PascalCase?
- Both join words without separators. camelCase keeps the first letter lowercase (userName); PascalCase capitalizes it too (UserName).
- Should I use snake_case or kebab-case?
- Follow the ecosystem. snake_case is standard for Python and database columns, while kebab-case is preferred for URLs and CSS because hyphens read as word breaks for search engines and humans.
- Why does my apostrophe split a word in camelCase?
- Apostrophes are treated as separators for identifier formats, so don't stop becomes donTStop. Remove the apostrophe first if you want dontStop.
- Does Title Case follow AP or Chicago style?
- No. It capitalizes every word. Lowercase short articles and prepositions manually if your style guide requires it.
- Are acronyms preserved?
- They are recognized as one word, but every output that lowercases words also lowercases the acronym, so userID becomes userId in camelCase.
- Is my text stored or sent anywhere?
- No. Conversion runs in your browser as you type, and the text is not uploaded or saved.