Case Converter
Convert text to UPPERCASE, lowercase, Title Case, Sentence case, camelCase, snake_case, kebab-case and more. Rule-based title case, one-click copy.
Every case at a glance
The table shows what each button does. The prose cases use the sentence what i learned from the history of the iPhone. it's a long story!, and the programming cases use Get user ID from XMLHttpRequest. Every example is generated by the same rules the converter uses, with Keep acronyms and mixed-case words switched on.
| Case | Result | Commonly used for |
|---|---|---|
| UPPERCASE | WHAT I LEARNED FROM THE HISTORY OF THE IPHONE. IT'S A LONG STORY! | Headings, labels, short warnings and acronyms. Use sparingly in long passages. |
| lowercase | what i learned from the history of the iphone. it's a long story! | Normalizing text before comparing or sorting it, email addresses, tags and hashtags. |
| Title Case | What I Learned From the History of the iPhone. It's a Long Story! | Titles of books, articles, songs and films, and headings in many style guides. |
| Sentence case | What I learned from the history of the iPhone. It's a long story! | Body text, and headings in many websites and apps. Also a quick fix for text typed in all caps. |
| Capitalized Each Word | What I Learned From The History Of The iPhone. It's A Long Story! | Names, simple labels and list items where every word should start with a capital. |
| aLtErNaTiNg | wHaT i LeArNeD fRoM tHe HiStOrY oF tHe IpHoNe. It'S a LoNg StOrY! | Mocking or playful tone online. Not for anything that needs to be read easily. |
| InVeRsE | WHAT I LEARNED FROM THE HISTORY OF THE IpHONE. IT'S A LONG STORY! | Fixing text typed with Caps Lock on by accident. |
| camelCase | getUserIdFromXmlHttpRequest | Variable and function names in JavaScript, Java and many other languages. |
| PascalCase | GetUserIdFromXmlHttpRequest | Class, type and component names in many languages. |
| snake_case | get_user_id_from_xml_http_request | Variable and function names in Python and Ruby, and database column names. |
| kebab-case | get-user-id-from-xml-http-request | URLs, file names and CSS class names. |
| CONSTANT_CASE | GET_USER_ID_FROM_XML_HTTP_REQUEST | Constants and environment variables. |
| dot.case | get.user.id.from.xml.http.request | Configuration keys and some package or property names. |
Title case rules used here
There is no single title case standard. This converter follows one stated rule, close to AP and APA style: capitalize every word except short articles, conjunctions and prepositions, and always capitalize the first and last word.
| Word | Rule |
|---|---|
| First and last word | Always capitalized, even if it is a small word. |
| First word after a colon, dash, period, question mark or exclamation point | Capitalized, so subtitles start with a capital. |
| Articles: a, an, the | Lowercase. |
| Coordinating conjunctions: and, but, for, nor, or, so, yet | Lowercase. |
| Prepositions of three letters or fewer: as, at, by, in, of, on, per, to, via, plus vs. and v. | Lowercase. |
| Longer prepositions such as from, with, into and about | Capitalized. |
| Short verbs and pronouns such as is, be, are, it and he | Capitalized. AP, Chicago and APA all capitalize them. |
| Up, off and out | Capitalized, because they are often part of a phrasal verb, as in "How to Set Up a Router". |
| Hyphenated compounds | Each part capitalized, except small words after the first part, as in "Step-by-Step". |
| ACRONYMS and mixedCase words | Left as they are when the keep option is on, unless the whole text is in capitals. |
| Input | Title Case |
|---|---|
| the lord of the rings | The Lord of the Rings |
| a day in the life | A Day in the Life |
| what are you looking for | What Are You Looking For |
| star wars: a new hope | Star Wars: A New Hope |
| an in-depth look at step-by-step guides | An In-Depth Look at Step-by-Step Guides |
| why NASA is going back to the moon | Why NASA Is Going Back to the Moon |
| THE END OF AN ERA | The End of an Era |
The last example is all capitals, so the keep option is ignored and every word is recased; otherwise nothing would change. Style guides differ in the details. AP and APA lowercase prepositions of three letters or fewer and capitalize longer ones. Chicago lowercases prepositions of any length, so words such as "from", "with" and "about" stay lowercase in the middle of a title. The guides also differ on some conjunctions, on "to" in infinitives and on hyphenated compounds. If a publication follows a particular guide, check the result against it.
Sentence case
Sentence case lowercases everything, then capitalizes the first letter of the text, the first letter after a period, question mark, exclamation point or ellipsis, and the first letter of each new line. The word "I" and its contractions (I'm, I've, I'll, I'd) are always capitalized. It is the quickest way to fix text that was typed in all capitals:
โ What I learned from the history of the iphone. It's a long story!
The converter cannot tell a proper noun from an ordinary word, so names such as "iPhone" lose their capitals when the source is all caps, and "paris" typed in lowercase stays lowercase. Abbreviations such as "e.g." followed by a space are treated as the end of a sentence. Read the result through before you use it.
Programming cases: how words are split
For camelCase, PascalCase, snake_case, kebab-case, CONSTANT_CASE and dot.case, the converter first breaks the text into words. It splits on spaces, punctuation, underscores, hyphens and dots, and on existing camelCase boundaries: a lowercase letter or digit followed by a capital, and the end of a run of capitals ("XMLHttp" becomes "XML" and "Http"). Apostrophes inside words are dropped, so "don't" becomes "dont". Each line is converted separately, so you can paste a list of names and convert them all at once.
| Input | snake_case | camelCase | kebab-case |
|---|---|---|---|
firstName | first_name | firstName | first-name |
user_id | user_id | userId | user-id |
XMLHttpRequest | xml_http_request | xmlHttpRequest | xml-http-request |
Hello, World! | hello_world | helloWorld | hello-world |
don't stop me now | dont_stop_me_now | dontStopMeNow | dont-stop-me-now |
version2Beta release | version2_beta_release | version2BetaRelease | version2-beta-release |
Acronyms are treated as ordinary words in camelCase and PascalCase ("Id", "Xml"), which matches many style guides for code; some teams prefer "ID" and "XML", so adjust by hand if yours does.
Choosing a case
For headings and titles
Pick either title case or sentence case for headings and use it everywhere in the same document or site. Mixing the two looks careless. Sentence case is simpler to apply consistently, because only the first word and proper nouns get capitals, while title case means deciding about every short word. If you write for a publication, its style guide decides; otherwise, choose one and note it for anyone else who writes for you.
For code, files and URLs
Follow the convention of the language or project you are working in. Python's style guide, PEP 8, recommends snake_case for function and variable names and CapWords (PascalCase) for class names. JavaScript code commonly uses camelCase for variables and functions and PascalCase for classes. CSS class names and URL paths are commonly kebab-case, and environment variables are commonly CONSTANT_CASE. Within one project, consistency matters more than the particular choice, and many teams enforce it with a linter.
Accented letters and other alphabets
The converter uses Unicode case rules, so accented and non-Latin letters convert too: "รฉlan" becomes "รLAN" and "ะผะพัะบะฒะฐ" becomes "ะะะกะะะ". A few letters change length. The German ร has no single capital form in standard case mapping, so "straรe" becomes "STRASSE". Scripts without capital letters, such as Chinese, pass through unchanged.
Programming cases keep accented letters, but many languages and systems only accept plain ASCII in names. For URL-safe text with accents removed, use the slug generator.
Tips
- Caps Lock accident: use InVeRsE to swap every letter back, or Sentence case to start fresh.
- Messy pasted text: clean up extra spaces and line breaks with the text formatter first, then change the case.
- Headlines to a length: check the result with the character counter or the word counter.