Free Handy Tools

Text Case Converter

Nine cases, and why programmers need most of them

Case conventions are not decoration. A database column, a JavaScript variable, a CSS class, a URL slug and an environment variable each have a different accepted form, and converting between them by hand is tedious and easy to get subtly wrong. This tool converts pasted text to UPPERCASE, lowercase, Title Case, Sentence case, camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE, or inverted case, and leaves the original in place so you can try another without losing it.

The everyday uses are just as common: fixing a heading typed with caps lock on, turning a product name into a URL slug, or reformatting a list pasted out of a spreadsheet.

How words are found

The programmer cases — camel, Pascal, snake, kebab and constant — all start by splitting the input into words. The splitter breaks on any character that is not a letter or a digit, and additionally at every lowercase-to-uppercase boundary, so "user profile image", "user_profile_image" and "userProfileImage" all yield the same three words and convert identically.

From there: camelCase joins them with the first word lowercased and the rest capitalised; PascalCase capitalises all of them; snake_case and kebab-case lowercase everything and join with an underscore or hyphen; CONSTANT_CASE uppercases and joins with underscores. So "user profile image" becomes userProfileImage, UserProfileImage, user_profile_image, user-profile-image and USER_PROFILE_IMAGE.

Title case and sentence case

Title case capitalises the first letter of every word and lowercases the rest, working on Unicode letters rather than ASCII, so "élan vital" correctly becomes "Élan Vital" rather than being left untouched. Sentence case lowercases everything and then capitalises the first letter of the text and the first letter after each sentence-ending punctuation mark, handling a closing quote or bracket in between: "Hello. world. HOW are you?" becomes "Hello. World. How are you?".

Both are mechanical rules, not editorial ones. Title case here capitalises every word, including articles and prepositions that most style guides would leave lowercase, and neither case knows that CEO and NASA are acronyms — "the CEO of NASA" comes back as "The Ceo Of Nasa". Proper nouns need a human pass afterwards.

Known limits

Consecutive capitals are treated as one word because the splitter only breaks at a lowercase-to-uppercase boundary, so "XMLHttpRequest" splits as XMLHttp and Request, giving xmlhttpRequest in camel case rather than xmlHttpRequest. Where acronym handling matters, insert a separator first.

Digits attach to whichever word they follow rather than forming their own, so "order_id 42" becomes orderId42. Punctuation inside a word is dropped by the programmer cases, which is correct for identifiers and destructive for prose — use title or sentence case for text you want to keep intact. Everything runs in your browser as you type; nothing is uploaded, which matters when the text being reformatted is not yours to share.

Case conversion questions

What is the difference between camelCase and PascalCase?

Only the first letter. camelCase lowercases the first word (userProfileImage) and PascalCase capitalises it (UserProfileImage). By convention, JavaScript and Java use camelCase for variables and functions and PascalCase for classes and components.

Which case should a URL use?

kebab-case. Search engines treat hyphens as word separators and underscores as joiners, URLs are case-sensitive after the domain, and lowercase avoids duplicate-URL problems entirely — which is why every slug on this site is lowercase and hyphenated.

Why did my capitalised acronym come back wrong?

Because title and sentence case lowercase everything after the first letter of a word, and the tool has no dictionary of acronyms. Convert first, then fix the handful of proper nouns and initialisms by hand.