TextJanitor

Case Converter

Paste your text and convert it to uppercase, lowercase, title case, sentence case, camelCase, snake_case and more with one click.

Working…

Text cases

Programmer cases

These work line by line and split words at spaces, underscores, hyphens, dots and capital letters.

Your text is processed in your browser and is never uploaded or stored on our servers.

How to use the Case Converter

  1. 1 Type or paste your text into the box.
  2. 2 Click the case you want. The text in the box is converted in place, and line breaks are kept.
  3. 3 Picked the wrong one? Use Undo and Redo to step back and forth, or pick another case.
  4. 4 Copy the result or download it as a .txt file.

Every common case in one place

A case converter rewrites the capital and small letters in your text without changing the words. This one covers the everyday cases, UPPERCASE, lowercase, Sentence case, Capitalize Each Word and Title Case, plus two playful ones, aLtErNaTiNg and InVeRsE, and seven programmer cases used for variable and file names. Everything happens inside the text box, so you can convert, check the result and convert again.

Before

the lord of the rings: a tale of war and peace

After

The Lord of the Rings: A Tale of War and Peace

How title case works

Title case capitalizes the important words in a heading and leaves small connecting words in lowercase. The first and last word are always capitalized, and so is the first word after a colon. You can pick one of three styles. AP style keeps short articles, conjunctions and prepositions such as a, the, of, in and to lowercase, but capitalizes longer ones like through or about. Chicago style lowers every preposition, however long. The simple style uses a short list of small words and capitalizes everything else. Words that already mix capitals, such as iPhone or NASA, are left exactly as you typed them.

Style guides disagree on some details, for example how to treat hyphenated words, so check the rules of your publication or school before you submit.

Sentence case and its limits

Sentence case lowers everything and then capitalizes the first letter after a full stop, question mark, exclamation mark or line break, plus the word I. It cannot know which words are proper nouns, so names such as London or Maria will come out in lowercase and need a quick fix by hand.

Programmer cases

Developers use a different case for almost every kind of name. These work line by line, and they split your words at spaces, underscores, hyphens, dots and capital letters, so XMLHttpRequest is read as XML, Http and Request.

  • camelCase and PascalCase for variables, functions and classes.
  • snake_case and CONSTANT_CASE for database columns, Python code and constants.
  • kebab-case for URLs, CSS classes and file names.
  • dot.case for configuration keys, and Train-Case for some HTTP headers.

Tips and common mistakes

Avoid long stretches of text in all capitals. It is slower to read and often feels like shouting. If your text has strange line breaks after pasting, run it through the line break remover first, then convert the case. To check how long the result is, open the word counter.

Frequently asked questions

What is the difference between title case and capitalize each word?

Capitalize Each Word makes every word start with a capital letter. Title Case keeps small words such as of, the and to in lowercase, except at the start and end, which is how most headlines are written.

Which title case style should I choose?

Use the one your publication or school asks for. If nobody does, AP style is a sensible default for headlines on the web, and Chicago style is common in books and academic writing.

Does sentence case fix names and acronyms?

No. It lowercases everything first, so proper nouns and acronyms need to be capitalized again by hand. Use Title Case, which leaves words that already contain capitals alone, if you need to keep them.

Are my line breaks kept?

Yes. Line breaks and blank lines stay where they are, and the programmer cases convert each line on its own.

Can I undo a conversion?

Yes. Undo and Redo step through your conversions in this session. They are cleared when you leave the page, and nothing is sent to our servers.

Does it work with accented letters and other alphabets?

Yes. It follows your browser's Unicode rules, so accented letters, Greek and Cyrillic convert correctly. Alphabets without capital letters, such as Arabic or Chinese, are left unchanged.