Text tools

Case converter

Fix text typed with Caps Lock on, turn a list of phrases into proper titles, or rename identifiers between camelCase, snake_case and friends. Line breaks are kept, so you can convert a whole list at once.

For writing
For code

Runs entirely in your browser. Nothing you enter here is uploaded.

How to change letter case

  1. Paste your text into the box. It can be a sentence, a paragraph or a list with one item per line.
  2. Press one of the buttons. The result appears below and keeps updating as you edit the original.
  3. Copy the result, or press Use result as input to apply another conversion on top.

The For writing buttons change only letter case, keeping every space and punctuation mark. The For code buttons split each line into words and join them again in the chosen naming style, which removes spaces and punctuation. Each line is converted separately, so a column of field names pasted from a spreadsheet comes back as a column.

The rules each style follows

Title Case

Title Case capitalises the important words and leaves short function words in lower case. This tool follows the rule in the Chicago Manual of Style, which most English-language publishers use: articles (a, an, the), coordinating conjunctions (and, but, or, nor, for, so, yet) and short prepositions (as, at, by, in, of, off, on, per, to, up, via) stay lower case — unless they are the first or last word, which is always capitalised. Hyphenated compounds get a capital on each part, as in Well-Known. AP style differs slightly (it capitalises prepositions of four letters or more); if you are writing to a specific style guide, check the handful of borderline words.

Sentence case

Sentence case lowers everything and then capitalises the first letter of the text and of each sentence, found after a full stop, question mark or exclamation mark followed by a space. It cannot know which words are proper nouns, so names like London or JavaScript come back lower case and need fixing by hand.

Naming styles for code

Identifiers are first split into words. Spaces, underscores, hyphens and other punctuation separate words, and so do changes of case: fooBar becomes foo and Bar, and a run of capitals followed by a capitalised word is split before the last capital, so XMLHttpRequest becomes XML, Http and Request. Digits stay attached to the word they follow. The words are then joined:

StyleJoined asCommon in
camelCasefirst word lower, others capitalisedJavaScript and Java variables, JSON keys
PascalCaseevery word capitalisedclass and type names, C# members
snake_caselower case, underscoresPython, Ruby, SQL columns
kebab-caselower case, hyphensURLs, CSS classes, file names
CONSTANT_CASEupper case, underscoresconstants, environment variables

Other alphabets

Upper and lower case follow Unicode rules, so accented letters convert correctly and the German ß becomes SS in upper case. Chinese, Japanese and other scripts without letter case pass through unchanged.

Examples

InputStyleResult
the lord of the ringsTitle CaseThe Lord of the Rings
what are you looking atTitle CaseWhat Are You Looking At (last word capitalised)
HELLO. WORLD! how ARE you? fineSentence caseHello. World! How are you? Fine
hello world foocamelCasehelloWorldFoo
hello world fooCONSTANT_CASEHELLO_WORLD_FOO
XMLHttpRequestsnake_casexml_http_request
StraßeUPPERCASESTRASSE

Renaming a batch of database columns: paste Customer ID, Order Date and Total Amount on three lines and press snake_case to get customer_id, order_date and total_amount.

Limits

  • Proper nouns and acronyms. Sentence case and lowercase cannot tell that NASA or Paris should keep their capitals. Title Case capitalises every major word, so iPhone becomes Iphone.
  • Style guides differ. Chicago, APA, AP and MLA disagree on a few words in Title Case — mostly longer prepositions such as "with" and "about". Check the guide you are writing for.
  • Language rules. Title Case rules are for English. In French, Spanish and German, titles usually capitalise only the first word and proper nouns (plus all nouns in German), which Sentence case gets closer to.
  • Locale-specific letters. The Turkish dotted and dotless i follow general Unicode rules rather than Turkish ones.

Frequently asked questions

How do I undo Caps Lock text?

Paste it and press Sentence case. Everything becomes lower case except the first letter of each sentence; then fix any names by hand.

Which words stay lower case in Title Case?

Articles, coordinating conjunctions and short prepositions, following the Chicago Manual of Style — unless they are the first or last word.

What is the difference between camelCase and PascalCase?

camelCase starts with a lower-case letter (userName); PascalCase starts with a capital (UserName). Both capitalise the start of every following word.

Can I convert many lines at once?

Yes. Each line is converted on its own and line breaks are kept.

Is my text sent anywhere?

No. The conversion happens in your browser and nothing is stored.

Sources and further reading

Guides that use this tool

↵ to open · Esc to close