Change text case

Paste your text and pick a format. Ten conversions cover everyday writing and the naming styles used in programming, and accented letters are handled correctly.

  • Free
  • No sign-up
  • Runs in your browser
change-case

100% private — your text is processed in your browser and never sent to any server.

How it works

Paste your text

A sentence, a title, a list of names or a whole paragraph.

Pick the format

UPPERCASE, lowercase, Title Case, Sentence case or a programming style.

Copy the result

The conversion is instant and updates as you type.

Fix capitalisation without retyping

Text that arrives in the wrong case is common: a heading typed with caps lock on, a list of names all in lowercase, a spreadsheet column in capitals or a title that should follow headline style. Retyping it is slow, and the word processor's case command is limited and hidden in a menu. Choose a format here and the whole text is converted at once.

Ordinary writing

  • UPPERCASE and lowercase convert every letter, and they follow the rules of the page language, including accented letters.
  • Title Case capitalises the first letter of every word and lowers the rest. With "keep small words in lowercase" on, short words such as of, the and and stay in lowercase in the middle of a title, as in headline style; the first and last words are always capitalised.
  • Sentence case lowercases everything and then capitalises the first letter of the text, the first letter after a full stop, question mark or exclamation mark, and the first letter of every line. It is the fix for text typed with caps lock on.
  • Invert case swaps every capital for a lowercase letter and the other way round.

Programming styles

The last five formats are naming conventions used in code, file names and URLs: camelCase, PascalCase, snake_case, kebab-case and CONSTANT_CASE. Each line of your text is converted separately, and words are detected at spaces, punctuation and at the boundaries of an existing camelCase, so userFirstName becomes user_first_name in snake case.

What it does not do

The tool does not know which words are proper names or acronyms. Sentence case and Title Case lowercase everything first, so names such as London or acronyms such as NASA are also affected and may need a manual touch-up afterwards. The list of small words is a simple one and does not cover every style guide. In programming styles, punctuation and accents are treated as separators, and accented letters are kept, so use remove accents first if you need plain ASCII identifiers.

In Excel and Google Sheets

With the text in A2 (here hello wORLD, it's o'neil):

Spreadsheet formulas for this calculation
To getFormulaResult
All capitals=UPPER(A2)HELLO WORLD, IT'S O'NEIL
All lower case=LOWER(A2)hello world, it's o'neil
Each Word Capitalized=PROPER(A2)Hello World, It'S O'Neil
Only the first letter in capitals=UPPER(LEFT(A2,1))&LOWER(MID(A2,2,LEN(A2)))Hello world, it's o'neil

The formulas use English function names and commas. If your Excel or Google Sheets is set to another language, the function names change, and in many countries the separator between arguments is a semicolon.

  • PROPER capitalizes every letter that follows a character that is not a letter, so it turns it's into It'S. It also lowercases the rest of each word, so acronyms such as USA become Usa.
  • There is no built-in function for sentence case or for title case that leaves small words such as of and and in lower case; the fourth formula covers the first, and the tool covers both.
  • Convert the formulas to values (Paste Special, Values) before deleting the original column.

In code

Each snippet below was run and the comments show the real output.

Python

import re
import string

def snake_case(s):
    s = re.sub(r"(?<=[a-z0-9])(?=[A-Z])", "_", s)  # helloWorld -> hello_World
    return re.sub(r"[\s\-]+", "_", s).lower()

print(snake_case("helloWorld example-text"))  # hello_world_example_text
print("it's a dog's life".title())  # It'S A Dog'S Life
print(string.capwords("it's a dog's life"))  # It's A Dog's Life

JavaScript (browser and Node.js)

const camelCase = s => s.toLowerCase().replace(/[-_\s]+(.)?/g, (_, c) => (c ? c.toUpperCase() : ""));
console.log(camelCase("hello_world example-text"));  // helloWorldExampleText
console.log("it's a dog's life".replace(/\b\w/g, c => c.toUpperCase()));  // It'S A Dog'S Life
  • Python's str.title() and the JavaScript \b\w trick both treat the apostrophe as a word break, so it's becomes It'S. string.capwords() splits on spaces only and avoids it.
  • Neither language has a built-in title case that leaves small words such as of or and in lower case. The tool does, and also converts between snake_case, camelCase, kebab-case and PascalCase.

Frequently asked questions

How do I convert text to uppercase or lowercase?

Paste the text, choose UPPERCASE or lowercase in "Convert to" and copy the result.

How do I fix text typed with caps lock on?

Choose "Sentence case". It lowercases everything and capitalises the start of each sentence and each line.

What is the difference between Title Case and Sentence case?

Title Case capitalises the first letter of every word, as in a headline. Sentence case only capitalises the first letter of each sentence.

Does it work with accented letters?

Yes. Conversions follow the rules of the page language, so é becomes É and the other way round.

Can I convert to camelCase or snake_case?

Yes. Choose camelCase, PascalCase, snake_case, kebab-case or CONSTANT_CASE. Each line is converted on its own.

Is my text uploaded anywhere?

No. The conversion runs in your browser.

How do I change text to uppercase or lowercase in Excel?

Use =UPPER(A2) for capitals, =LOWER(A2) for lower case and =PROPER(A2) to capitalize each word. They work the same in Google Sheets.

How do I convert camelCase to snake_case in Python?

Insert an underscore between a lower-case letter or digit and a capital, then lower-case everything: re.sub(r"(?<=[a-z0-9])(?=[A-Z])", "_", s).lower(). helloWorld becomes hello_world.