Case Converter

Switch text between upper, lower, sentence and title case, or turn it into camelCase, snake_case and other code names. Runs on your device

0 words · 0 chars

Title Case rule used here: the first word, the last word and the word after a colon are capitalized; a, an, the, and, but, or, nor, for, so, yet and prepositions of up to three letters (as, at, by, in, of, on, per, to, via) stay lowercase. Each part of a hyphenated word follows the same rule, and names with inner capitals, such as McKenzie, are left as typed.

Sentence case: a new sentence starts after . ? or ! followed by a space or line break, but not after abbreviations such as U.S., e.g. or Dr. Text is never saved; only the chosen case and this switch are remembered.

How to use the case converter

  1. Paste or type your textAnything from a single heading to several pages works. The word and character totals under the box update as you type.
  2. Pick a caseEach button converts the whole box in place. Try a few: every click starts again from the text you pasted, so switching from camelCase back to Title Case loses nothing.
  3. Decide about acronymsWith Keep acronyms on, words written entirely in capitals, like PDF or UNESCO, survive Sentence and Title case. Turn it off when the capitals are just emphasis you want gone.
  4. Copy the resultCopy puts the converted text on your clipboard and the button briefly says Copied. Undo takes you back one step to the text before conversion.

Every case, what it looks like and where it is used

The same phrase, parse HTTP response, run through each button, and the places where each style is the normal choice.

CaseExampleTypical use
UPPERCASEPARSE HTTP RESPONSEWarning labels, short buttons and signs; tiring to read in long passages because word shapes disappear.
lowercaseparse http responseTags, hashtags, email addresses and domain names, which ignore case anyway.
Sentence caseParse HTTP responseBody text, interface labels, news headlines on many sites, and reference list titles in several academic styles.
Title CaseParse HTTP ResponseBook, film and song titles, report headings and the headlines of many magazines and blogs.
camelCaseparseHttpResponseVariables and functions in JavaScript, Java and many other languages derived from C.
PascalCaseParseHttpResponseClass and type names in most object-oriented languages; also method names in C#.
snake_caseparse_http_responseVariables and functions in Python and Ruby, and table and column names in many databases.
kebab-caseparse-http-responseWeb addresses, file names, CSS class names and command-line options.
CONSTANT_CASEPARSE_HTTP_RESPONSEConstants and environment variables, such as a maximum retry count or a settings key.

How Title Case is decided

No single title case rule exists; publishers disagree mainly about prepositions. This converter follows a length rule that is easy to predict: short function words stay lowercase, everything else gets a capital. In practice that means:

  • Always capitalized: the first word, the last word, and the first word after a colon, so Star Wars: A New Hope and What Are You Looking For.
  • Always lowercase in the middle: the articles a, an and the; the conjunctions and, but, or, nor, for, so and yet; and prepositions of three letters or fewer, such as of, in, on, at, by and to.
  • Hyphenated words: each part is judged on its own, which turns state-of-the-art into State-of-the-Art and well-known into Well-Known.
  • Left alone: words that already have a capital after the first letter, like McKenzie or DeLuca, and all-capital acronyms while Keep acronyms is on.

Up, off and out are deliberately not on the lowercase list. In titles they are usually part of a phrasal verb, as in Setting Up Your Router or How to Log Out, and style guides generally capitalize a word used that way.

Where the big style guides differ

StylePrepositionsExample
AP (news writing, for titles of works)Lowercase up to three letters, capitalize four or moreA Walk With the Dog
APA (psychology and social sciences)Any word of four letters or more is capitalizedA Walk With the Dog
Chicago, 18th editionLowercase up to four letters, capitalize five or moreA Walk with the Dog, but Life Between the Lines
MLA (literature and languages)Lowercase at any length, unless first or lastLife between the Lines

The output of this tool matches AP and APA for prepositions. For Chicago, lowercase four-letter prepositions such as with, from, into and over by hand; for MLA, lowercase every preposition in the middle of the title. Earlier editions of the Chicago manual, up to the 17th, lowercased prepositions of any length, so older house styles may still expect that.

The title case rules guide goes through each word class with worked headlines, including the tricky ones: subordinating conjunctions, the word to, and phrasal verbs.

Code naming styles in practice

Programmers join several words into one identifier because spaces are not allowed in names. Which joiner you use is mostly a matter of the language community you are writing for, and style checkers in many projects enforce it.

  • Python uses snake_case for functions and variables, PascalCase for classes and CONSTANT_CASE for module-level constants, as set out in its official style guide.
  • JavaScript and Java use camelCase for variables and methods and PascalCase for classes; constants are often in CONSTANT_CASE.
  • Go uses the capital letter itself as a rule: a name that starts with a capital is visible outside its package, so the choice between camelCase and PascalCase changes what the code exposes.
  • Web addresses and style sheets use kebab-case. Search engines treat hyphens in a URL as word separators, which is one reason title-case-rules is preferred over title_case_rules in page addresses.
  • Shell and server settings use CONSTANT_CASE for environment variables, such as a variable that holds a port number or a log level.

When converting to a code style, each line of your text becomes one identifier. The converter splits words at spaces, punctuation, underscores and hyphens, and also at the point where a lowercase letter meets a capital, so getUserID becomes get, user and id. A run of capitals followed by a capitalized word is split before the last capital, which turns XMLHttpRequest into xml, http and request. Digits stay attached to the word they touch: utf8 decoder becomes utf8Decoder, not utf8_decoder with a separate 8.

Pitfalls to check after converting

Acronyms and initialisms

A converter can only guess that NASA is an acronym because it is written in capitals. An acronym typed in lowercase, such as nasa, stays lowercase in Sentence case, and a short shouted word such as OK or NO is kept in capitals when Keep acronyms is on. In code styles acronyms are always treated as normal words, which gives parseHttpResponse rather than parseHTTPResponse; several popular style guides for code recommend exactly that, because it keeps word boundaries visible.

Proper nouns

Sentence case lowercases everything that does not start a sentence, including names of people, places, months and weekdays. We met in paris on monday is what you get from WE MET IN PARIS ON MONDAY, and only a person knows to restore the capitals. The pronoun I is the one exception the converter handles for you, along with its contractions such as I'm and I'll.

Names with unusual capitals

Title Case capitalizes only the first letter of a word, so o'neill becomes O'neill and macdonald becomes Macdonald. If a name is already written correctly, with a capital in the middle, the converter keeps it; if it arrives in lowercase, fix it by hand.

Letters outside English

Case rules follow the Unicode standard, which is right for most languages but not all. German ß has no single capital form in that mapping, so straße in UPPERCASE becomes STRASSE, one letter longer. Turkish uses a dotted and a dotless i, and the general mapping turns the capital I into an ordinary dotted i, which is wrong in Turkish text. Greek works well, including the special final form of sigma at the end of a word. Many programming languages accept accented letters in identifiers, but databases and older tools may not, so check before using é or ñ in a snake_case column name.

Converting a list of headings? Put each heading on its own line. Title Case treats every line as a separate title, so the first and last word of each line is capitalized correctly.

Questions

How do I fix text typed with Caps Lock on?

Paste it in and press Sentence case. When a line has no lowercase letters at all, the converter cannot tell acronyms from shouting, so it treats every word as ordinary text and lowercases it. Check afterwards for names and acronyms that should stay capitalized.

Why did a word stay in capitals after Sentence case?

Keep acronyms is on and the word has two or more capitals and no lowercase letters, apart from an optional plural s, so it was read as an abbreviation such as NASA or PDFs. Switch Keep acronyms off and the text is converted again from your original.

Is my text saved anywhere?

No. The text box is never written to storage, so reloading or closing the page empties it. Only two settings are remembered in this browser: the last case you picked and whether Keep acronyms is on.

Can I undo a conversion?

Yes, one step. Undo returns the text to how it was before your first click on a case button, even if you tried several cases in a row. Typing in the box starts a fresh snapshot, and Undo also brings back text removed with Clear.

Which title case style does the converter follow?

It lowercases articles, the seven short coordinating conjunctions and prepositions of three letters or fewer, and capitalizes everything else. That matches the style used by many news and psychology publishers. Book publishers that also lowercase longer prepositions such as with and from need a quick manual pass.

What happens to accents and other alphabets?

Letters from any alphabet with upper and lower case are converted, including accented Latin, Greek and Cyrillic. Scripts without case, such as Chinese or Arabic, pass through unchanged, and they still split words in the code styles when separated by spaces or punctuation.

Guides

More handy tools