Case converter
Paste text and pick a style.
How it was converted
The styles, and where each one is used
| Style | Example | Used for |
|---|---|---|
| UPPERCASE | HELLO WORLD | Short headings, signs and acronyms |
| lowercase | hello world | E-mail addresses, tags, comparing texts |
| Sentence case | Hello world. How are you? | Ordinary writing, and titles in Spanish |
| Capitalize Each Word | Hello World From Here | Names and some headings |
| Title Case | The Lord of the Rings | Titles and headlines in English |
| camelCase | helloWorld | Variables and functions in JavaScript, Java and Swift |
| PascalCase | HelloWorld | Class names in most languages; methods in C# |
| snake_case | hello_world | Variables and functions in Python and Ruby; database columns |
| kebab-case | hello-world | Web addresses, CSS classes and file names |
| CONSTANT_CASE | HELLO_WORLD | Constants 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.
| Text | camelCase | snake_case | CONSTANT_CASE |
|---|---|---|---|
| año fiscal 2024 | anoFiscal2024 | ano_fiscal_2024 | ANO_FISCAL_2024 |
| XMLHttpRequest | xmlHttpRequest | xml_http_request | XML_HTTP_REQUEST |
| user ID | userId | user_id | USER_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
-
Word and character counter
Count words, characters, sentences and reading time, and see how many SMS your text takes.
-
Remove accents
Strip accents and diacritics from text, keep the ñ if you want, or make a URL slug.
-
Invisible character finder
Reveal hidden spaces, zero-width characters and look-alike letters, and clean them out.
-
Diff checker
See what changed between two texts, line by line and word by word.