Case converter

Paste text and pick a style.

Style

How it was converted

The styles, and where each one is used

StyleExampleUsed for
UPPERCASEHELLO WORLDShort headings, signs and acronyms
lowercasehello worldE-mail addresses, tags, comparing texts
Sentence caseHello world. How are you?Ordinary writing, and titles in Spanish
Capitalize Each WordHello World From HereNames and some headings
Title CaseThe Lord of the RingsTitles and headlines in English
camelCasehelloWorldVariables and functions in JavaScript, Java and Swift
PascalCaseHelloWorldClass names in most languages; methods in C#
snake_casehello_worldVariables and functions in Python and Ruby; database columns
kebab-casehello-worldWeb addresses, CSS classes and file names
CONSTANT_CASEHELLO_WORLDConstants and environment variables

The last five are for names in code, where spaces are not allowed. Follow the convention of the language or project you work in: Python’s style guide (PEP 8) uses snake_case for functions and variables and PascalCase for classes, while JavaScript code mostly uses camelCase.

How names in code are split into words

To build camelCase, snake_case and the rest, the text is first split into words, and the box below the result shows them. A new word starts:

  • at a space, a hyphen, an underscore or any other punctuation: user_name and user-name give user, name;
  • where a lowercase letter meets a capital: userName gives user, Name;
  • before the last capital of a run followed by a lowercase letter, so acronyms stay together: XMLHttpRequest gives XML, Http, Request;
  • where letters meet digits: version2 gives version, 2.

Apostrophes inside a word disappear (don’t becomes dont), and each line is converted on its own, so you can paste a list of names and convert them all at once.

TextcamelCasesnake_caseCONSTANT_CASE
año fiscal 2024anoFiscal2024ano_fiscal_2024ANO_FISCAL_2024
XMLHttpRequestxmlHttpRequestxml_http_requestXML_HTTP_REQUEST
user IDuserIduser_idUSER_ID

Accents are removed from these styles by default (año becomes ano). Many languages do accept letters like ñ in names, but plain letters avoid trouble with keyboards, file systems and tools. Untick the option to keep them.

Title case in English, sentence case in Spanish

English headlines capitalize the important words. This page leaves in lowercase the articles (a, an, the), the coordinating conjunctions (and, but, or, nor, for, so, yet) and the prepositions of three letters or fewer (as, at, by, in, of, on, per, to, via), unless one is the first or last word or follows a colon. Up and off are capitalized, because in titles they are usually part of a verb (Set Up, Take Off). Style guides disagree about longer prepositions: AP capitalizes with and from, Chicago lowercases every preposition. Check those against the guide you follow.

Spanish works differently. The Real Academia Española asks for a capital only on the first word and on proper nouns in the titles of books, films, songs and articles: Cien años de soledad, not Cien Años De Soledad. For a Spanish title, choose Sentence case and then put back the capitals of any names.

Accents and special letters

Uppercase and lowercase follow the rules of each letter: ß becomes SS, and accented letters keep their accent, so árbol becomes ÁRBOL. In Spanish that is correct: capitals carry their accent like any other letter. Text in other alphabets, such as Greek or Cyrillic, changes case too; scripts without capitals, such as Chinese, stay as they are.

Common mistakes

  • Sentence case lowercases names: “I met María at NASA” comes back as “I met maría at nasa”. Put those capitals back by hand.
  • Capitalize Each Word is not English title case: it also capitalizes of, the and and.
  • Title Case applied to Spanish text gives Cien Años De Soledad, which Spanish style rejects.
  • A sentence is ended by any period, so after an abbreviation such as e.g. or etc. followed by a space, the next word gets a capital.

Questions

How do I change capital letters to lowercase?

Paste the text, choose lowercase and copy the result. Choose Sentence case instead if you want each sentence to keep its first capital.

Are line breaks kept?

Yes, in every style. In the styles for code, each line becomes a separate name.

Why did iPhone stay as it was in Title Case?

A word with a capital inside it is usually written that way on purpose, so it is kept. If the whole text is in capitals, it is lowercased first, because then the capitals say nothing about any one word.

Is my text sent anywhere?

No. The conversion happens in your browser.

More text tools

See all tools