This case converter changes text between upper case, lower case, title case and the naming styles programmers use. Paste your text, click the case you want and copy the result. It works on many lines at once.
How to use the case converter online
- Type or paste your text in the top box.
- Click a case button, such as Title Case or snake_case.
- Read the result in the second box.
- Click Copy result. Use Use result as input to apply another case on top.
Cases this tool supports
| Case | Example output (from "learn java and python") | Common use |
|---|---|---|
| UPPER CASE | LEARN JAVA AND PYTHON | Short labels, acronyms |
| lower case | learn java and python | Fixing text typed with Caps Lock on |
| Title Case | Learn Java and Python | Headings, titles |
| Capitalize Each Word | Learn Java And Python | Names, simple labels |
| Sentence case | Learn java and python | Normal sentences |
| camelCase | learnJavaAndPython | Java and JavaScript variables |
| PascalCase | LearnJavaAndPython | Class names |
| snake_case | learn_java_and_python | Python variables, database columns |
| kebab-case | learn-java-and-python | URLs, CSS classes |
| CONSTANT_CASE | LEARN_JAVA_AND_PYTHON | Constants in code |
| iNVERSE cASE | lEARN jAVA (from "Learn Java") | Swapping every letter's case |
Convert text to title case: the rules used
Title Case here follows a simple style rule:
- The first and last words always start with a capital.
- Short words stay lower case in the middle: a, an, the, and, but, or, nor, for, so, yet, as, at, by, in, of, off, on, per, to, up, via and vs.
- Every other word starts with a capital.
So "the lord of the rings" becomes "The Lord of the Rings". Style guides such as APA and Chicago differ on a few small words, so check the guide your college or publisher asks for.
Common mistake: A common mistake is using Title Case on acronyms. The tool lowers the rest of each word, so "HTML basics" becomes "Html Basics". Fix acronyms by hand after converting.
How the code cases split words
For camelCase, snake_case and the other code styles, the tool splits your text into words at spaces, punctuation, underscores, hyphens and at existing capital letters. That means you can convert between styles directly:
| Input | Output |
|---|---|
| user_id_number → camelCase | userIdNumber |
| firstNameValue → snake_case | first_name_value |
| parseHTMLString → snake_case | parse_html_string |
Each line is converted on its own, so you can paste a list of names and convert them all.
Practise case conversion in code
Changing case is a classic beginner exercise. Try convert a string to uppercase without built-in methods and toggle the case of each character in a string. The Java string methods page covers toUpperCase() and toLowerCase().
Pro tip: Upper and lower case letters differ by 32 in ASCII, so 'A' is 65 and 'a' is 97. See the bits for yourself in the text to binary converter.
Need a word or character count after converting? Use the word counter.
